[FLINK-40334][table] Insert-only input should stay unmaterialized under FORCE - #28930
Open
gustavodemorais wants to merge 1 commit into
Open
[FLINK-40334][table] Insert-only input should stay unmaterialized under FORCE#28930gustavodemorais wants to merge 1 commit into
gustavodemorais wants to merge 1 commit into
Conversation
Collaborator
…er FORCE FLINK-38928 dropped the guard that skipped the sink upsert materializer for insert-only input, because DO ERROR and DO NOTHING need the operator to compare inserts that share a primary key. Without it, an insert-only query into a sink with a primary key gets a SinkUpsertMaterializer and a keyed shuffle whenever upsert materialization is forced, even though there are no changes to reconcile. Restore the guard and pass the conflict strategy into the sink transformation so that only DO ERROR and DO NOTHING keep materializing insert-only input. The decision stays at translation time on purpose. Plans compiled before the clause existed persist requireUpsertMaterialize = true for this case, so suppressing the operator in the planner instead would make it appear on restore.
airlock-confluentinc
Bot
force-pushed
the
FLINK-40334
branch
from
August 6, 2026 09:55
42ee793 to
a06db41
Compare
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
FLINK-38928 dropped the guard that skipped the sink upsert materializer for insert-only input (here), because DO ERROR and DO NOTHING need the operator to compare inserts that share a primary key. Without it, an insert-only query into a sink with a primary key gets a SinkUpsertMaterializer and a keyed shuffle whenever upsert materialization is forced. This restores the guard so that only DO ERROR and DO NOTHING keep materializing insert-only input.
Short version: this makes so we generate the same job for the same compiled plan again after the regression 3ecbbd1523f#diff-a3e03102c64370ff75d10affae859b211715603dc4dc81bc6c25bf83f1161adcL191
Brief change log
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?
2.1.220 (Claude Code) with Opus 5