db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Nielsen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3290) Derby cannot store java Double or Float values .NaN and .INFINITE
Date Wed, 19 Dec 2007 13:12:43 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12553349

Thomas Nielsen commented on DERBY-3290:

Neither the JDBC 4.0 specification[1] nor "JDBC API Tutorial and Reference"[2] mention handling
of the NaN or INFINITE numbers at all AFAICT. As there is no mention of how to handle *jdbc*
doubles (and literals), it seems this then boils down to how/if the database handle the *sql*
double (and literals).

Continuing into the SQL 2003 foundation spec[3] I can't find any explicit mention of NaN/INFINITE
numbers for either FLOAT, REAL or DOUBLE PRECISION sql datatypes.

The combined information from
- chapter 4.4.1 "Characteristics of numbers", and
- chapter 6.1 "Data Types", section "Syntax Rules", paragraphs 24) through 27),
state that the maximum and minimum numbers supported are implementation defined for the sql

In the end it boils down to what the database actually supports, and at the moment Derby does
not support neither NaN or INFINITE.

Given that Derby is a 100% java database it would seem appropriate that the legal java numbers
NaN and INFINITE should be supported for the java types Double and Float.

[1] JSR-221, JDBC 4.0, http://jcp.org/aboutJava/communityprocess/final/jsr221/index.html
[2] "JDBC API Tutorial and Reference, Third Edt.", Fisher, Ellis & Bruce, Addison-Wesley
[3] ISO/IEC 9075-2:2003 (E), "Information technology - database languages - SQL - Part 2:
Foundation (SQL/Foundation)"

> Derby cannot store java Double or Float values .NaN and .INFINITE
> -----------------------------------------------------------------
>                 Key: DERBY-3290
>                 URL: https://issues.apache.org/jira/browse/DERBY-3290
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Thomas Nielsen
>            Priority: Minor
> 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.

View raw message