Timo Walther created FLINK-39256:
------------------------------------
Summary: Support ORDER BY clause in PTFs
Key: FLINK-39256
URL: https://issues.apache.org/jira/browse/FLINK-39256
Project: Flink
Issue Type: Sub-task
Components: Table SQL / API, Table SQL / Planner, Table SQL / Runtime
Reporter: Timo Walther
Assignee: Timo Walther
Support the ORDER BY clause for time attributes in PTF table arguments. By
defining a SQL like:
{code}
SELECT * FROM MyPtf(input => TABLE t PARTITION BY k ORDER BY ts)
{code}
A temporal sort operation is inserted that leads to similar behavior as for
{code}
MATCH_RECOGNIZE(PARTITION BY userid ORDER BY ts)
{code}
in StreamExecMatch which also drops late data.
The ORDER BY supports sorting on multiple columns (e.g. ORDER BY ts ASC, c2
ASC, c3 DESC), however, the first column must be a watermarked time attribute
in ascending order. In case of multiple table arguments, the ORDER BY is
executed per input table (as a sorting operator before the executing PTF
operator).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)