[FLINK-40324][table] Append-only should stay unmaterialized without an ON CONFLICT clause - #28918
Open
gustavodemorais wants to merge 1 commit into
Open
[FLINK-40324][table] Append-only should stay unmaterialized without an ON CONFLICT clause#28918gustavodemorais wants to merge 1 commit into
gustavodemorais wants to merge 1 commit into
Conversation
twalthr
approved these changes
Aug 4, 2026
twalthr
left a comment
Contributor
There was a problem hiding this comment.
One minor comment, otherwise LGTM
| sink.conflictStrategy == null || sink.isDeduplicateConflictStrategy | ||
|
|
||
| // For a DEDUPLICATE strategy and INSERT only input, we simply let the inserts be handled | ||
| // as UPSERT_AFTER and overwrite previous value |
Contributor
There was a problem hiding this comment.
Suggested change
| // as UPSERT_AFTER and overwrite previous value | |
| // as UPDATE_AFTER and overwrite previous value |
Contributor
Author
There was a problem hiding this comment.
Ah, old comment has this and we just copied. Thanks, fixed
…n ON CONFLICT clause Before FLIP-558, insert-only input never enabled the sink upsert materializer. The AUTO branch now only short-circuits when DEDUPLICATE is stated explicitly, so an append-only query into a sink with a primary key and no ON CONFLICT clause enables materialization instead, adding a SinkUpsertMaterializer and a keyed shuffle the pipeline did not have before. Omitting the clause selects DEDUPLICATE, so it has to short-circuit as well. The check moves after the require-on-conflict validation so that enforcement still reports a missing clause.
airlock-confluentinc
Bot
force-pushed
the
FLINK-40324
branch
from
August 4, 2026 17:11
71e87e8 to
219785d
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
An append-only query into a sink with a primary key and no ON CONFLICT clause currently enables the sink upsert materializer, adding a SinkUpsertMaterializer and a keyed shuffle the pipeline did not have before FLIP-558. This keeps those queries unmaterialized, since an absent clause selects DEDUPLICATE and insert-only input has nothing to deduplicate. It is only reachable with table.exec.sink.require-on-conflict set to false, which otherwise rejects the missing clause.
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