db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject Re: Sequences: Constraints for optional arguments
Date Tue, 12 Jan 2010 18:59:53 GMT
Hi Suran,

Thanks for tackling this work. Some comments inline...

Suran Jayathilaka wrote:
> Hi Rick,
>
> I've added the changes for the bind part of the optional clauses in 
> Sequence creation. The argument values now get saved in the catalog 
> table.
>
> In CreateSequenceNode's bindStatement() method, what kind of 
> constraints should be enforced on the optional arguments, datatype in 
> particular?
I think there is a fairly complete set of constraints in the functional 
spec attached to DERBY-712. Look for the section titled "New CREATE 
SEQUENCE Syntax". Let me know if that doesn't seem complete enough and I 
will dive into the SQL Standard for more guidance. Concerning the 
datatype, the parser should have limited the datatype to just the 
integer types supported by Derby, so you shouldn't have to verify the 
datatype--of course, this deserves a regression test!
> And for the start value option, if neither that nor min value is 
> specified, would the default be "1" or the min value of the sequence's 
> data type?
According to the constraints in the functional spec, the default initial 
value is MINVALUE if INCREMENT is positive and MAXVALUE if INCREMENT is 
negative. If MINVALUE is not specified, it defaults to the smallest 
(most negative) integer which fits in the data type of the sequence 
generator. Similarly, if MAXVALUE is not specified, it defaults to the 
largest positive integer which fits in the data type.

>
> Also, in DBMSNodes.properties, I noticed that there are 2 values for 
> the property key "derby.module.cloudscapenodes.ci 
> <http://derby.module.cloudscapenodes.ci>".
I see that CastNode and CoalesceFunctionNode share this key. This looks 
like a mistake to me.

Thanks,
-Rick
>
> Thanks!
> Suran
>


Mime
View raw message