db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-499) Expose BOOLEAN datatype to end users
Date Thu, 08 Dec 2005 07:55:09 GMT
    [ http://issues.apache.org/jira/browse/DERBY-499?page=comments#action_12359711 ] 

Kathey Marsden commented on DERBY-499:
--------------------------------------

Looks like good progress on Boolean.   
 

Code Comments and questions

0)
I do kind of wish  constant reorganization and partial addition of other new types were in
 separate patches.  

1)
My biggest question about  the patch are the new types and the assignment of these temporary
codes.   Will these be finalized before 10.2? Why have some other types be added to the DRDATypes
but not the SQL Types.  I was wondering if it might pose any conflict with work underway for
XML?


// Experimental types. These codes will change when the Open Group
	// publishes an addendum to the DRDA spec covering these
	// datatypes.
	
	public	static final int DRDA_TYPE_BOOLEAN = 0xD0;
	public	static final int DRDA_TYPE_NBOOLEAN = 0xD1;
	public	static final int DRDA_TYPE_XML = 0xD2;
	public	static final int DRDA_TYPE_NXML = 0xD3;
	public	static final int DRDA_TYPE_NATCHAR = 0xD4;
	public	static final int DRDA_TYPE_NNATCHAR = 0xD5;
	public	static final int DRDA_TYPE_NATVARCHAR = 0xD6;
	public	static final int DRDA_TYPE_NNATVARCHAR = 0xD7;
	public	static final int DRDA_TYPE_LONGNATVARCHAR = 0xD8;
	public	static final int DRDA_TYPE_NLONGNATVARCHAR = 0xD9;
	public	static final int DRDA_TYPE_NATCLOB = 0xDA;
	public	static final int DRDA_TYPE_NNATCLOB = 0xDB;
	
	// extensions to the db2 datatypes
    public	static final  int DB2_SQLTYPE_BOOLEAN = 1000;     // BOOLEAN
    public	static final  int DB2_SQLTYPE_NBOOLEAN = 1001;

}

2)
DRDAConnThread comments

In readAndSetParams it looks like BOOLEAN is not being handled.  Are the client parameters
still being sent as SMALLINT  parameters?  


Line 6576
I think rather than a makeint method in DRDAConnThread I would rather see a writeByte(boolean
b) method in  DDMWriter similar to writeShort(boolean b), 

changing 
writer.writeByte( makeInt( (Boolean) val ) );

to 
writer.writeByte((Boolean) val ).booleanValue() );

3)
There seem to be places in the client code that have case statements for all the types, for
example, many of the methods in CrossConverters. Does boolean need to be handled in these
cases?


4)
DatabaseMetadata.getTypeInfo() doesn't seem to return BOOLEAN/BIT.  I think there has to be
a differentiation of the output based on the client JVM version.  



Test comments

5)
What client/server version combinations did you run the Compatibility tests?

5)
Would you consider adding a boolean column to an ij test  in the netmats suite like supersimple.sql
to verify the ij formatting is ok and also provide some testing with earlier clients that
it is being sent as smallint for clients other than derby 10.2 client?
 
6)
Should jdbcapi/parameterMapping.java  be updated for the new type? I know it is  not junit
but does  provide a comprehensive picture of the type behaviour and it shouldn't be too hard
to add a type to that test.

7)
It seems more important than ever that we have at least some very basic client/server compatibility
testing with the the 10.1.1.0  release as part of derbyall.  



> Expose BOOLEAN datatype to end users
> ------------------------------------
>
>          Key: DERBY-499
>          URL: http://issues.apache.org/jira/browse/DERBY-499
>      Project: Derby
>         Type: New Feature
>   Components: SQL
>     Versions: 10.1.1.0
>     Reporter: Rick Hillegas
>     Assignee: Rick Hillegas
>  Attachments: BooleanFS.html, bug499.diff, bug499_doc.zip
>
> Veaceslav Chicu started an email thread on 8 August 2005 titled "boolean type". He was
disappointed that Derby doesn't support the ansi BOOLEAN datatype. On closer inspection, Derby
does internally support this type but does not expose this support to end users.
> Derby should let users declare table columns of type BOOLEAN. This should be an indexable
datatype.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message