Apply conditional SET_SEMANTIC_TABLE trait to FROM_CHANGELOG#28025
Draft
raminqaf wants to merge 10 commits intoapache:masterfrom
Draft
Apply conditional SET_SEMANTIC_TABLE trait to FROM_CHANGELOG#28025raminqaf wants to merge 10 commits intoapache:masterfrom
raminqaf wants to merge 10 commits intoapache:masterfrom
Conversation
…eFunction and reuse it
…nd ExecNode deserialization
…or TraitCondition
…stricter encapsulation
…dedup toCallContext
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
FROM_CHANGELOGis currently locked to row semantics — each row is processed independently, with no way to co-locate rows for the same key in the same parallel operator instance. This is fine for stateless downstreams but limits use cases where the resulting changelog feeds into a stateful operator keyed on the same column.This PR uses the conditional-traits machinery introduced for
TO_CHANGELOGin FLINK-39392 to switchFROM_CHANGELOGto set semantics when the call providesPARTITION BY. Behavior withoutPARTITION BYis unchanged.Brief change log
BuiltInFunctionDefinitions.FROM_CHANGELOG: input table argument adds withConditionalTrait(SET_SEMANTIC_TABLE,hasPartitionBy())FromChangelogTest#testSetSemanticsWithPartitionBy) verifying theExchange(hash[...])propagationFromChangelogTestPrograms#SET_SEMANTICS_PARTITION_BY) verifying end-to-end output equivalencedocs/.../changelog.md) andTable#fromChangelogJavaDocVerifying this change
This change added tests and can be verified as follows:
PARTITION BYid is specified, and the output changelogMode propagates correctlySET_SEMANTICS_PARTITION_BYprogram) — end-to-end run verifying that addingPARTITION BYchanges he parallel execution layout but does NOT alter row-level output (same +I, -U, +U, -D sequence as the row-semantics tests)FromChangelogTestandFromChangelogSemanticTestscases continue to pass without modification, confirming the conditional trait does not regress the row-semantics pathDoes this pull request potentially affect one of the following parts:
@Public(Evolving): no (only FROM_CHANGELOG's declared traits change; the function signature and Table#fromChangelog API are unchanged)Documentation
docs/content/docs/sql/reference/queries/changelog.md) and JavaDocs(
Table#fromChangelog)Was generative AI tooling used to co-author this PR?