trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traflm <...@git.apache.org>
Subject [GitHub] trafodion pull request #1563: [TRAFODION-3015] retrieve a value from numeric...
Date Sat, 12 May 2018 15:25:55 GMT
GitHub user traflm opened a pull request:

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

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

    … using xx='value'
    
    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

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

    https://github.com/apache/trafodion/pull/1563.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 #1563
    
----
commit 56b175ed6c41c202ce6ceef4fbadb16df37045cf
Author: Liu Ming <ovis_poly@...>
Date:   2018-05-12T14:58:25Z

    [TRAFODION-3015] retrieve a value from numeric type  get no result if using xx='value'

----


---

Mime
View raw message