Fabian Hueske created FLINK-40885:
-------------------------------------
Summary: Support LATERAL SNAPSHOT join in the Table API
Key: FLINK-40885
URL: https://issues.apache.org/jira/browse/FLINK-40885
Project: Flink
Issue Type: Improvement
Components: Table SQL / API
Reporter: Fabian Hueske
Assignee: Fabian Hueske
The SNAPSHOT process-table function (FLINK-39783 et al.) can currently only be
used via SQL (JOIN LATERAL SNAPSHOT(...)). The programmatic Table API cannot
express an equivalent joinLateral / leftOuterJoinLateral with call("SNAPSHOT",
...) — it fails during planning or API validation.
Three gaps:
- QueryOperationConverter does not convert a TABLE argument of a correlated
function into a table-scan input, and wraps the call in a Correlate (not a
LogicalJoin), so the LATERAL SNAPSHOT rewrite rule never matches for INNER
joins.
- CorrelatedFunctionTableFactory rejects .as(...) on SNAPSHOT because it is
PROCESS_TABLE, not TABLE.
- JoinOperationFactory forbids an ON predicate on a lateral left outer join,
which SNAPSHOT requires.
Goal: enable joinLateral / leftOuterJoinLateral with SNAPSHOT so the Table API
produces the same plan as the equivalent SQL, covering INNER, LEFT OUTER,
column aliases, and a Table-valued build side.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)