fhueske opened a new pull request, #29368:
URL: https://github.com/apache/flink/pull/29368
## What is the purpose of the change
Enable the `LATERAL SNAPSHOT` processing-time temporal join to be expressed
through the programmatic Table API (`Table.joinLateral` /
`Table.leftOuterJoinLateral` with a `call("SNAPSHOT", …)` build side), not just
SQL. The Table API surface produces the same optimized plan and operator
(`StreamExecLateralSnapshotJoin`) as the equivalent SQL.
## Brief changelog
- `QueryOperationConverter`: convert a SNAPSHOT `TABLE` argument into a
`RexTableArgCall` + scan input and emit a plain `LogicalJoin` (not a
`Correlate`) so `LogicalJoinToLateralSnapshotJoinRule` matches, incl. INNER
joins; deduplicate the table-argument conversion shared with the FROM-clause
PTF path.
- `JoinOperationFactory`: allow an ON predicate for a lateral SNAPSHOT join
and require an equi-join predicate (reject always-true/empty ON with a clear
error).
- `CorrelatedFunctionTableFactory`: accept `.as(...)` aliasing on SNAPSHOT
(a `PROCESS_TABLE` function).
- Tests: Table API ↔ SQL plan-parity (INNER/LEFT, transformed build side,
aliased columns, optional args, scrambled named-arg order, default
compile-time, hidden `METADATA VIRTUAL` rowtime across column-expansion
strategies); Table API validation negatives as unit tests; execution smokes;
plus matching SQL coverage for the metadata-rowtime case.
Adding docs is still to be done. Will update the PR later.
## Verifying this change
- `LateralSnapshotJoinTableApiTest` — plan-parity + validation negatives (15
tests)
- `LateralSnapshotJoinSemanticTests` — SQL + Table API end-to-end execution
smokes (15 tests)
- `LateralSnapshotJoinTest` (stream + batch) — SQL plan/golden + negative
cases
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: yes
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? yes
- If yes, how is the feature documented? to-be-done
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (please specify the tool below)
Generated-by: Claude Code, Opus 4.8
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]