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/12/28 11:30:00 UTC

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

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

Dian Fu updated FLINK-18827:
----------------------------
        Parent: FLINK-20787
    Issue Type: Sub-task  (was: Bug)

> 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: Sub-task
>          Components: Table SQL / API
>    Affects Versions: 1.11.0
>            Reporter: Dian Fu
>            Priority: Major
>
> 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)