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] [Updated] (DERBY-3398) Support min/max values for Java types float/double in real/double columns
Date Wed, 20 Feb 2013 04:49:12 GMT

     [ https://issues.apache.org/jira/browse/DERBY-3398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Dag H. Wanvik updated DERBY-3398:

    Attachment: derby-3398-8.diff

Uploading #8 with the fix for MIN_NORMAL, committed patch as svn 1448002. 

Commit log:

Removes the legacy DB limits on floating point numbers.
This lets the application use Derby for all Java float and double
values with the exception of NaN (not a number), -0.0 (normalized to
+0.0) and +/- infinity as defined in the IEEE-754 1985 floating-point

After this change, on soft upgrade, instead of throwing on the DB2
limits when calling ResultSet#updateXXX or PreparedStatement#setXXX,
the check throws on ResultSet#updateRow, or #insertRow, and similarly
on PreparedStatement#execute.

Upgrade tests test this behavior. But don't run floating
ResultSet#updateXXX on old releases prior to 10.2 (they don't support
forward updatable result sets).

The patch also fixes max display width for real and double numbers
since some values's printed representation were truncated by ij (even
before the DB2 limits change). This accounts for the all the canons

> 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:
>            Reporter: Knut Anders Hatlen
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>              Labels: derby_triage10_10
>         Attachments: derby-3398-2.diff, derby-3398-3.diff, derby-3398-3.stat, derby-3398-4.diff,
derby-3398-5.diff, derby-3398-5.stat, derby-3398-7.diff, derby-3398-7.stat, derby-3398-8.diff,
derby-3398.diff, derby-3398.status, releaseNote.html, releaseNote.html
> 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

View raw message