Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-17948

Use new type system for SQL Client collect sink

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.11.0
    • Fix Version/s: 1.13.0
    • Component/s: Table SQL / Client
    • Labels:
      None
    • Environment:

      mysql:
      image: mysql:8.0
      volumes:

      • ./mysql/mktable.sql:/docker-entrypoint-initdb.d/mktable.sql
        environment:
        MYSQL_ROOT_PASSWORD: 123456
        ports:
      • "3306:3306"

      Description

      My job is following:

       

      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')
      
      

      When select * from currency, the precision of results are not as same as expected.  The precision of field precise_timestamp is 3 not 6, and the field gdp has more digit as expected. 

       

      The data in mysql is following:

        Attachments

        1. image-2021-04-13-10-26-34-721.png
          439 kB
          Shengkai Fang
        2. image-2020-05-26-22-58-02-326.png
          217 kB
          Shengkai Fang
        3. image-2020-05-26-22-56-43-835.png
          223 kB
          Shengkai Fang

          Activity

            People

            • Assignee:
              fsk119 Shengkai Fang
              Reporter:
              fsk119 Shengkai Fang
            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: