[api] Trim whitespace in the bucket-key option value - #9591
Merged
Conversation
Schema already trims primary-key and partition, so a space after a comma is accepted there but turns into part of the column name for bucket-key and fails the field-name check with a confusing message.
jackylee-ch
force-pushed
the
bucket-key-trim
branch
from
September 4, 2026 04:53
d179316 to
5f5a7b6
Compare
Contributor
|
+1 |
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.
Purpose
TableSchema.originalBucketKeyssplitsbucket-keyon,without trimming, so'bucket-key' = 'id, name'keeps the leading space in the second name and fails the field-name check two lines later withField names [id, name] should contains all bucket keys [id, name]. The identically formatted'primary-key' = 'id, name'is accepted, becauseSchematrims bothprimary-keyandpartition.SparkCatalog.resolveColumnNameListalready pre-trims to work around this, so only the Flink SQL, Hive and Java/REST paths hit it.Tests
TableSchemaTest#testBucketKeyTrimsWhitespaceAroundSeparator.Written with Claude Code; reasoning and verification are mine.