GitHub user traflm opened a pull request:

    https://github.com/apache/trafodion/pull/1564

    [TRAFODION-3015] retrieve a value from numeric type get no result

    When the column is defined as NUMERIC(19,0), underlying data type will use 
FLOAT to save the number.
    So an implicit cast will generate wrong result when user input is string 
literal.
    For example:
    create table t3015 (a1 NUMERIC(19,0) );
    insert into t3015 values(27380468);
    select * from t3015 where a1='27380468';
    
    will have wrong output.
    
    The fix is to report error, if the precision of NUMERIC is greater than 18, 
and try to cast STRING into it.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/traflm/trafodion TRAFODION-3015-1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafodion/pull/1564.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1564
    
----
commit 3e8703cbb433deebf616156617db95874aaafcdd
Author: Liu Ming <ovis_poly@...>
Date:   2018-05-13T10:20:14Z

    [TRAFODION-3015] retrieve a value from numeric type get no result

----


---

Reply via email to