Timo Walther created FLINK-24877:
------------------------------------
Summary: Implicitly add time attributes for VALUES clause
Key: FLINK-24877
URL: https://issues.apache.org/jira/browse/FLINK-24877
Project: Flink
Issue Type: Improvement
Components: Table SQL / API
Reporter: Timo Walther
This might be a big change that we cannot do due to backwards compatibility.
But I would like to at least log the idea and hear the opinions of others.
In theory, we could make all top-level timestamp columns of the {{VALUES}}
clause time attributes. Since VALUES are always bounded, a watermark strategy
is implicitly added with MAX WATERMARK at the end. This means that any
timestamp can be used a time attribute.
Given the following example:
{code}
VALUES
(1, 'name 1', TIMESTAMP '2020-03-08 13:12:11.123', 100, 41, 'payload 1'),
(2, 'name 2', TIMESTAMP '2020-03-09 13:12:11.123', 101, 42, 'payload 2'),
(3, 'name 3', TIMESTAMP '2020-03-10 13:12:11.123', 102, 43, 'payload 3'),
(2, 'name 2', TIMESTAMP '2020-03-11 13:12:11.123', 101, 42, 'payload')
{code}
We could define windows or interval joins for testing or examples. It would
make the starting experience nicer. With UNION ALL a user can have a minimum
set of records in an otherwise streaming pipeline (after checkpointing finished
tasks).
--
This message was sent by Atlassian Jira
(v8.20.1#820001)