You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jingsong Lee (Jira)" <ji...@apache.org> on 2023/03/29 01:53:00 UTC

[jira] [Closed] (FLINK-27628) Table Store records and fetches incorrect results with NaN

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

Jingsong Lee closed FLINK-27628.
--------------------------------
    Resolution: Fixed

> Table Store records and fetches incorrect results with NaN
> ----------------------------------------------------------
>
>                 Key: FLINK-27628
>                 URL: https://issues.apache.org/jira/browse/FLINK-27628
>             Project: Flink
>          Issue Type: Bug
>          Components: Table Store
>    Affects Versions: table-store-0.2.0
>            Reporter: Caizhi Weng
>            Priority: Major
>
> Use the following test data and SQL to reproduce this issue.
> gao.csv:
> {code}
> 1.0,2.0,aaaaaaaaaaaaaaa
> 0.0,0.0,aaaaaaaaaaaaaaa
> 1.0,1.0,aaaaaaaaaaaaaaa
> 0.0,0.0,aaaaaaaaaaaaaaa
> 1.0,0.0,aaaaaaaaaaaaaaa
> 0.0,0.0,aaaaaaaaaaaaaaa
> -1.0,0.0,aaaaaaaaaaaaaaa
> 1.0,-1.0,aaaaaaaaaaaaaaa
> 1.0,-2.0,aaaaaaaaaaaaaaa
> {code}
> Flink SQL:
> {code}
> Flink SQL> create table T ( a double, b double, c string ) WITH ( 'connector' = 'filesystem', 'path' = '/tmp/gao.csv', 'format' = 'csv' );
> [INFO] Execute statement succeed.
> Flink SQL> create table S ( a string, b double ) WITH ( 'path' = '/tmp/store' );
> [INFO] Execute statement succeed.
> Flink SQL> insert into S select c, a / b from T;
> [INFO] Submitting SQL update statement to the cluster...
> [INFO] SQL update statement has been successfully submitted to the cluster:
> Job ID: 851d7b3c233061733bdabbf30f20d16f
> Flink SQL> select c, a / b from T;
> +-----------------+-----------+
> |               c |    EXPR$1 |
> +-----------------+-----------+
> | aaaaaaaaaaaaaaa |       0.5 |
> | aaaaaaaaaaaaaaa |       NaN |
> | aaaaaaaaaaaaaaa |       1.0 |
> | aaaaaaaaaaaaaaa |       NaN |
> | aaaaaaaaaaaaaaa |  Infinity |
> | aaaaaaaaaaaaaaa |       NaN |
> | aaaaaaaaaaaaaaa | -Infinity |
> | aaaaaaaaaaaaaaa |      -1.0 |
> | aaaaaaaaaaaaaaa |      -0.5 |
> +-----------------+-----------+
> 9 rows in set
> Flink SQL> select * from S;
> +-----------------+-----------+
> |               a |         b |
> +-----------------+-----------+
> | aaaaaaaaaaaaaaa | -Infinity |
> | aaaaaaaaaaaaaaa | -Infinity |
> | aaaaaaaaaaaaaaa | -Infinity |
> | aaaaaaaaaaaaaaa | -Infinity |
> | aaaaaaaaaaaaaaa | -Infinity |
> | aaaaaaaaaaaaaaa | -Infinity |
> | aaaaaaaaaaaaaaa | -Infinity |
> | aaaaaaaaaaaaaaa |      -1.0 |
> | aaaaaaaaaaaaaaa |      -0.5 |
> +-----------------+-----------+
> 9 rows in set
> {code}
> Note that this issue may also affect {{FieldStatsCollector}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)