[
https://issues.apache.org/jira/browse/DERBY-3290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12553393
]
Daniel John Debrunner commented on DERBY-3290:
----------------------------------------------
Just to add this is more involved than just removing the checks for
Nan/Infinity. It needs to be thought out otherwise one can end up with a whole
host of bugs (as I think the user thread pointed out for older versions of SQL
Server). Examples of areas that require thought/work are:
- define how =,<,> work (most likely based upon IEEE)
- define how +,-,*,/ work (most likely based upon IEEE)
- does the decisions for <,> make sense for an index, where would Nan be
ordered in an index?
- probably need to add builtin SQL functions for Double.isNan, isInfinite
- how do aggregates work
- does max() return positive infiinty if the column has that value, or
does it throw an exception or ignore the value
- sum() with infinities, sum() with Nan - what happens ...
- etc.
- are literals needed for these values?
- conversion to other numeric types
My vague memory is that these values are not accepted in Derby to avoid all of
these issues.
I'm not sure about the argument that because Java supports these values the
database must, as a counter example Java supports unicode strings but it would
be valid for a database to only support a character set that is a subset of
unicode, thus not supporting all of the character values that are valid in java.
> Derby cannot store java Double or Float values .NaN and
> .[POSITIVE|NEGATIVE]_INFINITY
> -------------------------------------------------------------------------------------
>
> Key: DERBY-3290
> URL: https://issues.apache.org/jira/browse/DERBY-3290
> Project: Derby
> Issue Type: Improvement
> Components: SQL
> Reporter: Thomas Nielsen
> Priority: Minor
> Attachments: TestNaN.java
>
>
> Issue originally reported on derby-user, where user cannot store .NaN or
> .INFINITE for java datatypes Double or Float.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.