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

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

Thanks for detecting the boolean howler, Knut. As for accepting the values 
always, I am sceptical, cf  this example (your scenario post soft upgrade 
insert):

    ij> select d from t10_9;
    D                     
    ----------------------
    1.7976931348623157E308

    ij> select d*1.0 from t10_9;
    1                     
    ----------------------
    ERROR 22003: The resulting value is outside the range for the data type 
DOUBLE.
    
    ij> update t2 set d=(select max(d) from t10_9);
    ERROR XJ001: Java exception: 'ASSERT FAILED error on clone,  value = 
1.7976931348623157E308 isnull = false: 
org.apache.derby.shared.common.sanity.AssertFailure'.
    ERROR 22003: The resulting value is outside the range for the data type 
DOUBLE.

So it seems the normalization is only skipped in certain contexts...

                
> 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-2.diff, derby-3398-3.diff, derby-3398-3.stat, 
> 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

Reply via email to