[iceberg] Omit unknown bounds in Iceberg manifest partition summary - #9152
Open
thswlsqls wants to merge 1 commit into
Open
[iceberg] Omit unknown bounds in Iceberg manifest partition summary#9152thswlsqls wants to merge 1 commit into
thswlsqls wants to merge 1 commit into
Conversation
When every entry of a manifest has a null partition value, the collected partition statistics have no min/max, and IcebergManifestEntryWriter.result() passed those nulls straight to IcebergConversions.toByteBuffer(), failing the whole commit with a NullPointerException. Omit the bound instead, as the Iceberg spec declares lower_bound (510) and upper_bound (511) optional. Guard the reading side too, so a later non add-only commit does not hit the same null in IcebergConversions.toPaimonObject(). Generated-by: Claude Code
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
fix #9151
IcebergManifestEntryWriter.result()passed the unknown (null) partition min/max straight toIcebergConversions.toByteBuffer().lower_bound(510) /upper_bound(511) optional, andIcebergPartitionSummary.schema()already declares both nullable.toPaimonObject().IcebergDataFileMeta.create()has omitted unknown bounds since [core] Add field statistics in IcebergDataFileMeta #4090; this path never got the equivalent guard.Tests
IcebergCompatibilityTest#testNullPartitionValue: commitspt='a', a NULL-only batch,pt='b', thentruncatePartitions(pt='a'); asserts the omitted bounds and reads every row viaIcebergGenerics.toByteBuffer:83without the writer guard,toPaimonObject:167without the reader guard.mvn -pl paimon-core -Dtest='Iceberg*Test' test— 159 tests passed (41 inIcebergCompatibilityTest), checkstyle and spotless clean.