Conversation
dwangatt
marked this pull request as ready for review
September 28, 2026 23:46
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.
Summary
This PR is extracted from the original larger PR #9370 and contains the end-to-end implementation required to make partition-level bucket counts safe and usable in Flink.
This PR delivers end-to-end support for partition-level bucket counts in Flink.
It supersedes the closed core-only prerequisite PR #10170. The partition-layout scan prerequisite has already merged in #10052; this PR combines the remaining core routing contract with the supported engine path, Spark policy, documentation, and integration coverage.
Behavior
When
bucket.per-partition-count-enabled = trueon a partitioned fixed-bucket table:totalBucketsvalue to the writer.INSERT OVERWRITEroutes with the target layout so a rescaled partition’s rewritten files are both hashed and stamped with the new bucket count.(partition, bucket)are rejected when the option is enabled, because they cannot prove which bucket count was used for routing.The option remains a no-op for unpartitioned tables, which retain the existing single table-level bucket-count invariant.
Documentation
bucket.per-partition-count-enabledto generated core configuration documentation.savepoint stop → rescale/overwrite → restart.
Tests
spark.paimon.write.use-v2-write=falseandtrue.Verification