[jira] [Created] (FLINK-17948) Strange precision performance of Timestamp and Decimal

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-17948) Strange precision performance of Timestamp and Decimal

Shang Yuanchun (Jira)
Shengkai Fang created FLINK-17948:
-------------------------------------

             Summary: Strange precision performance of Timestamp and Decimal
                 Key: FLINK-17948
                 URL: https://issues.apache.org/jira/browse/FLINK-17948
             Project: Flink
          Issue Type: Bug
          Components: Connectors / JDBC, Table SQL / Client
    Affects Versions: 1.11.0
         Environment: mysql:
 image: mysql:8.0
 volumes:
 - ./mysql/mktable.sql:/docker-entrypoint-initdb.d/mktable.sql
 environment:
 MYSQL_ROOT_PASSWORD: 123456
 ports:
 - "3306:3306"
            Reporter: Shengkai Fang


My job is following:

 
{code:java}
CREATE TABLE currency (
  currency_id BIGINT,
  currency_name STRING,
  rate DOUBLE,
  currency_timestamp  TIMESTAMP,
  country STRING,
  precise_timestamp TIMESTAMP(6),
  precise_time TIME(6),
  gdp DECIMAL(10, 6)
) WITH (
   'connector' = 'jdbc',
   'url' = 'jdbc:mysql://localhost:3306/flink',
   'username' = 'root',
   'password' = '123456',
   'table-name' = 'currency',
   'driver' = 'com.mysql.jdbc.Driver',
   'lookup.cache.max-rows' = '500',
   'lookup.cache.ttl' = '10s',
   'lookup.max-retries' = '3')

{code}
When select * from currency, the precision of results is not as same as expected. The reults of the precision of field precise_timestamp is 3 not 6, and the field gdp has many digit as expected. 

 

!image-2020-05-26-22-45-40-711.png!

The data in mysql is following:

!image-2020-05-26-22-52-02-661.png!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)