Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-20787 Improve the Table API to make it usable
  3. FLINK-18827

The time attribute is lost when constructing a Table via TableEnvironment.from

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.11.0
    • Fix Version/s: None
    • Component/s: Table SQL / API
    • Labels:
      None

      Description

      For the following job:

      val t_env = TableEnvironment.create(new EnvironmentSettings.Builder().inBatchMode().useBlinkPlanner().build())
          val sourceDdl = """
            create table Orders(
              a VARCHAR,
              b BIGINT,
              c BIGINT,
              rowtime TIMESTAMP(3),
              WATERMARK FOR rowtime AS rowtime - INTERVAL '1' SECOND
            ) with (
              'connector' = 'filesystem',
            'format' = 'csv',
            'path' = '/tmp'
            )"""
      t_env.executeSql(sourceDdl)
      val orders = t_env.from("Orders")
      print(orders.getSchema)
      

      the schema of table "orders" is as following:

      root
       |-- a: STRING
       |-- b: BIGINT
       |-- c: BIGINT
       |-- rowtime: TIMESTAMP(3)
       |-- WATERMARK FOR rowtime AS `rowtime` - INTERVAL '1' SECOND
      

      We can see that the type of field 'rowtime' is regular TIMESTAMP which is not expected.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dian.fu Dian Fu
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: