zhang-arvin opened a new pull request, #9338: URL: https://github.com/apache/paimon/pull/9338
## Which issues does this PR fix? Closes #9256. ## What changes are included in this PR? When using KEY_DYNAMIC bucket mode (bucket = -1 with crossPartitionUpdate), the `CALL sys.compact` procedure would throw: ``` UnsupportedOperationException: Unsupported bucket mode: KEY_DYNAMIC ``` The `CompactorSinkBuilder` only handled `HASH_FIXED` and `HASH_DYNAMIC` bucket modes, but `KEY_DYNAMIC` is also a bucket-aware mode that should use the same `buildForBucketAware()` path. ## Root Cause In `CompactorSinkBuilder.build()`, the switch statement on `BucketMode` only had cases for `HASH_FIXED` and `HASH_DYNAMIC`. The `KEY_DYNAMIC` case was missing, causing it to fall through to the default branch which throws an `UnsupportedOperationException`. ## Fix Add `KEY_DYNAMIC` to the case statement alongside `HASH_DYNAMIC` so that it also routes to `buildForBucketAware()`. ## How was this patch tested? The change is a one-line addition of a case statement. The `FlinkSinkBuilder` already handles `KEY_DYNAMIC` by routing to `buildDynamicBucketSink(input, true)`, confirming that KEY_DYNAMIC is a valid bucket-aware mode that should be supported in the compaction path. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
