[FLINK-39784][table] Forbid SNAPSHOT function outside LATERAL context#28674
Open
fhueske wants to merge 3 commits into
Open
[FLINK-39784][table] Forbid SNAPSHOT function outside LATERAL context#28674fhueske wants to merge 3 commits into
fhueske wants to merge 3 commits into
Conversation
Generated-By: Claude Opus 4.7 (1M context)
… operator Rewrites a join over a SNAPSHOT table function in a LATERAL clause into a dedicated FlinkLogicalLateralSnapshotJoin and converts it to a StreamPhysicalLateralSnapshotJoin / StreamExecLateralSnapshotJoin backed by the LateralSnapshotJoinOperator. The nodes derive their own output row type (materializing the build-side rowtime) and carry the SNAPSHOT arguments as fields. Generated-By: Claude Opus 4.8 (1M context)
Adds ForbidSnapshotOutsideLateralRule, which rejects any SNAPSHOT scan that survives the LATERAL SNAPSHOT rewrite with a clear message instead of failing later in the generic PTF translation. Generated-By: Claude Opus 4.8 (1M context)
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
This PR builds on #28664 (FLINK-39783). Only the commits tagged with
FLINK-39784are relevant for this PR.Brief change log
ForbidSnapshotOutsideLateralRulewhich throws an exception when it encounters aFlinkLogicalTableFunctionScanfor aSNAPSHOTfunction.ForbidSnapshotOutsideLateralRuletoLOGICAL_REWRITERuleSetafterLogicalJoinToLateralSnapshotJoinRule, ensuring that the new rule is applied for all SNAPSHOT functions that were not rewritten be earlier rule(s).Verifying this change
Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation
Was generative AI tooling used to co-author this PR?
Co-authored-by: Claude Code 2.1.200 (Opus 4.8)