You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Knut Anders Hatlen <Kn...@Sun.COM> on 2008/02/01 09:58:30 UTC

Re: java.sql.SQLDataException: The resulting value is outside the range for the data type DOUBLE.

Hong Ji <ho...@gmail.com> writes:

> Thanks for the replies.
>
> It will definitely help if the Java  Double.MAX_VALUE and
> Double.MIN_VALUEare supported in Derby.
>
> Any reason why the Double.MAX_VALUE/Double.MIN_VALE are different in Derby
> and Java?

According to the comments in the code, this is a limitation that was
introduced for compatibility with DB2. Being compatible with DB2 is no
longer a requirement for Derby, so if it's not causing any backward
compatibility issues and someone signs up for DERBY-3290, there's
nothing stopping us from lifting the restriction.

-- 
Knut Anders

Re: java.sql.SQLDataException: The resulting value is outside the range for the data type DOUBLE.

Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
Daniel John Debrunner <dj...@apache.org> writes:

> Knut Anders Hatlen wrote:
>> Hong Ji <ho...@gmail.com> writes:
>>
>>> Thanks for the replies.
>>>
>>> It will definitely help if the Java  Double.MAX_VALUE and
>>> Double.MIN_VALUEare supported in Derby.
>>>
>>> Any reason why the Double.MAX_VALUE/Double.MIN_VALE are different in Derby
>>> and Java?
>>
>> According to the comments in the code, this is a limitation that was
>> introduced for compatibility with DB2. Being compatible with DB2 is no
>> longer a requirement for Derby, so if it's not causing any backward
>> compatibility issues and someone signs up for DERBY-3290, there's
>> nothing stopping us from lifting the restriction.
>
> DERBY-3290 is a different issue, that's for adding support for
> non-numeric values to DOUBLE such as Double.Nan, which is believed to
> be against the SQL standard. Extending the range to match the java
> range should be a separate issue.

Ah, sorry, I read [POSITIVE|NEGATIVE]_INFINITY in the summary as
[MIN|MAX]_VALUE. I agree that it should be logged as a separate
issue. (It isn't logged, is it?)

-- 
Knut Anders

Re: java.sql.SQLDataException: The resulting value is outside the range for the data type DOUBLE.

Posted by Daniel John Debrunner <dj...@apache.org>.
Knut Anders Hatlen wrote:
> Hong Ji <ho...@gmail.com> writes:
> 
>> Thanks for the replies.
>>
>> It will definitely help if the Java  Double.MAX_VALUE and
>> Double.MIN_VALUEare supported in Derby.
>>
>> Any reason why the Double.MAX_VALUE/Double.MIN_VALE are different in Derby
>> and Java?
> 
> According to the comments in the code, this is a limitation that was
> introduced for compatibility with DB2. Being compatible with DB2 is no
> longer a requirement for Derby, so if it's not causing any backward
> compatibility issues and someone signs up for DERBY-3290, there's
> nothing stopping us from lifting the restriction.

DERBY-3290 is a different issue, that's for adding support for 
non-numeric values to DOUBLE such as Double.Nan, which is believed to be 
against the SQL standard. Extending the range to match the java range 
should be a separate issue.

Dan.