You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jark Wu (Jira)" <ji...@apache.org> on 2020/05/26 10:25:00 UTC
[jira] [Assigned] (FLINK-17753) watermark defined in ddl does not
work in Table api
[ https://issues.apache.org/jira/browse/FLINK-17753?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jark Wu reassigned FLINK-17753:
-------------------------------
Assignee: godfrey he
> watermark defined in ddl does not work in Table api
> ---------------------------------------------------
>
> Key: FLINK-17753
> URL: https://issues.apache.org/jira/browse/FLINK-17753
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Planner
> Reporter: godfrey he
> Assignee: godfrey he
> Priority: Major
> Fix For: 1.11.0
>
>
> the following code will get {{org.apache.flink.table.api.ValidationException: A group window expects a time attribute for grouping in a stream environment.}}
> {code:java}
> @Test
> def testRowTimeTableSourceGroupWindow(): Unit = {
> val ddl =
> s"""
> |CREATE TABLE rowTimeT (
> | id int,
> | rowtime timestamp(3),
> | val bigint,
> | name varchar(32),
> | watermark for rowtime as rowtime
> |) WITH (
> | 'connector' = 'projectable-values',
> | 'bounded' = 'false'
> |)
> """.stripMargin
> util.tableEnv.executeSql(ddl)
> val t = util.tableEnv.from("rowTimeT")
> .where($"val" > 100)
> .window(Tumble over 10.minutes on 'rowtime as 'w)
> .groupBy('name, 'w)
> .select('name, 'w.end, 'val.avg)
> util.verifyPlan(t)
> }
> {code}
> The reason is planner does not convert {{watermarkSpecs}} in {{TableSchema}} to correct type when calling {{tableEnv.from}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)