You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by traflm <gi...@git.apache.org> on 2018/05/13 10:21:57 UTC

[GitHub] trafodion pull request #1564: [TRAFODION-3015] retrieve a value from numeric...

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 <ov...@...>
Date:   2018-05-13T10:20:14Z

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

----


---

[GitHub] trafodion pull request #1564: [TRAFODION-3015] retrieve a value from numeric...

Posted by traflm <gi...@git.apache.org>.
Github user traflm closed the pull request at:

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


---