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)