Skip to content

Commit ac1ec47

Browse files
committed
Fix null identity-partitioned cols after apache#1824.
1 parent 2ed0a6f commit ac1ec47

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

crates/iceberg/src/arrow/record_batch_transformer.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,10 @@ fn constants_map(
8383
// Handle both None (null) and Some(Literal::Primitive) cases
8484
match &partition_data[pos] {
8585
None => {
86-
// TODO (https://github.com/apache/iceberg-rust/issues/1914): Add support for null datum values.
87-
return Err(Error::new(
88-
ErrorKind::Unexpected,
89-
format!(
90-
"Partition field {} has null value for identity transform",
91-
field.source_id
92-
),
93-
));
86+
// Skip null partition values - they will be resolved as null per Iceberg spec rule #4.
87+
// When a partition value is null, we don't add it to the constants map,
88+
// allowing downstream column resolution to handle it correctly.
89+
continue;
9490
}
9591
Some(Literal::Primitive(value)) => {
9692
// Create a Datum from the primitive type and value

0 commit comments

Comments
 (0)