db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-3398) Support min/max values for Java types float/double in real/double columns
Date Thu, 07 Feb 2013 06:19:13 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13573236#comment-13573236
] 

Dag H. Wanvik commented on DERBY-3398:
--------------------------------------

Thanks, Knut. Yes, I'll be adding more tests surely. The upgrade question needs considering.
Probably we should not remove the old limits if we are in soft update - just to be safe. The
limits are all in the engine, so client/server versions shouldn't be an issue. The issue would
be even more urgent of we allow NaN: We still reject to store/deal with NaN and +/-Infinity.
We could consider lifting those, too, but that's for another issue I think. I see that PostGreSQL
allows them:

http://www.postgresql.org/docs/8.3/static/datatype-numeric.html

but it requires handling equality and sorting too. From the PostGreSQL docs: 

"Note: IEEE754 specifies that NaN should not compare equal to any other floating-point value
(including NaN). In order to allow floating-point values to be sorted and used in tree-based
indexes, PostgreSQL treats NaN values as equal, and greater than all non-NaN values."


                
> Support min/max values for Java types float/double in real/double columns
> -------------------------------------------------------------------------
>
>                 Key: DERBY-3398
>                 URL: https://issues.apache.org/jira/browse/DERBY-3398
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.4.1.3
>            Reporter: Knut Anders Hatlen
>            Priority: Minor
>              Labels: derby_triage10_10
>         Attachments: derby-3398.diff, derby-3398.status
>
>
> Derby doesn't support the entire range of valid (finite) values of the Java primitive
types double/float in columns with SQL type DOUBLE or REAL. This appears to be a limitation
that was introduced for compatibility with DB2. There have been some requests on derby-user
that we lift this restriction.
> The restriction is enforced by the methods normalizeREAL() and normalizeDOUBLE() in org.apache.derby.iapi.types.NumberDataType.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message