You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Dian Fu (Jira)" <ji...@apache.org> on 2020/08/05 09:42:00 UTC

[jira] [Created] (FLINK-18827) The time attribute is lost when constructing a Table via TableEnvironment.from

Dian Fu created FLINK-18827:
-------------------------------

             Summary: The time attribute is lost when constructing a Table via TableEnvironment.from
                 Key: FLINK-18827
                 URL: https://issues.apache.org/jira/browse/FLINK-18827
             Project: Flink
          Issue Type: Bug
          Components: Table SQL / API
    Affects Versions: 1.11.0
            Reporter: Dian Fu


For the following job:
{code}
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)
{code}

the schema of table "orders" is as following:
{code}
root
 |-- a: STRING
 |-- b: BIGINT
 |-- c: BIGINT
 |-- rowtime: TIMESTAMP(3)
 |-- WATERMARK FOR rowtime AS `rowtime` - INTERVAL '1' SECOND
{code}

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



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