You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Yiwen Tu (Jira)" <ji...@apache.org> on 2020/04/20 01:52:00 UTC
[jira] [Updated] (FLINK-17179) Set row time attribute not working
in connector descriptor
[ https://issues.apache.org/jira/browse/FLINK-17179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yiwen Tu updated FLINK-17179:
-----------------------------
Fix Version/s: 1.11.0
> Set row time attribute not working in connector descriptor
> ----------------------------------------------------------
>
> Key: FLINK-17179
> URL: https://issues.apache.org/jira/browse/FLINK-17179
> Project: Flink
> Issue Type: Bug
> Components: Connectors / Kafka, Table SQL / API
> Affects Versions: 1.10.0
> Reporter: Yiwen Tu
> Priority: Critical
> Fix For: 1.11.0
>
> Attachments: image-2020-04-16-14-40-14-219.png
>
>
> Read data from kafka and set row time attribute in connector descriptor like this:
> fsTableEnv.connect(new Kafka()
> .version("universal")
> .topic("stg_rljghxx_damo")
> .property()
> ...
> ).withFormat(new Json()
> .schema(Types.ROW(new String[]\{"FaceID", "faceQuality","ShotTime"},
> new TypeInformation[]\{Types.STRING(),Types.FLOAT(), Types.INT()})))
> .withSchema(new Schema()
> .field("FaceID", Types.STRING())
> .field("faceQuality",Types.FLOAT())
> .field("ShotTime", Types.INT()).rowtime(new Rowtime().timestampsFromField("ShotTime")))
> .createTemporaryTable("my_table");
>
> And then use field of ShotTime as event time in window like this:
> Table result = table.window(Session.withGap("2.minutes").on("ShotTime").as("w")).groupBy("w, ..")
> .select(..);
> And throws an error:
> !image-2020-04-16-14-40-14-219.png!
> And When use DDL in sql,
> it works.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)