fhueske opened a new pull request, #29421:
URL: https://github.com/apache/flink/pull/29421
## What is the purpose of the change
LATERAL SNAPSHOT join required at least one equality predicate and rejected
any join without one. This also rejected valid equi-joins whose equi-key was
folded to a constant by a local filter on the join key (e.g. `ON o.k = c.k
WHERE o.k = 'x'`): Calcite pins both sides to the constant and simplifies the
join condition, leaving no equi-key for the rule to find.
Lift the equi-key requirement so LATERAL SNAPSHOT behaves like other Flink
joins that tolerate a missing equi-key: a keyless join runs single-threaded -
SINGLETON distribution in streaming (the operator already supports an empty
key) and a broadcast nested-loop join in batch. A join with an equi-key is
unchanged.
This resolves FLINK-40902: the filtered query above now plans and executes
correctly instead of being rejected.
## Brief change log
* prod changes
* remove equi-join predicate check from optimizer rule
* add logic to translate batch LSJ into broadcast NL join if there's no
equi-join predicate
* tests
* add operator harness tests to ensure that operator runs correctly in
keyless setting
* add stream + batch compiler tests to ensure statements are correctly
planned
* add semantic tests to ensure correct e2e execution
* update docs: remove equi-join restriction
## Verifying this change
* run existing and new LSJ tests
## 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)`: no
- 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? docs
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (please specify the tool below)
Generated-by: Claude Code (Claude 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]