Skip to content

Commit b52ef72

Browse files
committed
Allow typepromotion from binary to fixed binary
1 parent c7fc8a5 commit b52ef72

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

crates/iceberg/src/arrow/reader.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,10 @@ impl ArrowReader {
870870
) if requested_precision >= file_precision && file_scale == requested_scale => true,
871871
// Uuid will be store as Fixed(16) in parquet file, so the read back type will be Fixed(16).
872872
(Some(PrimitiveType::Fixed(16)), Some(PrimitiveType::Uuid)) => true,
873+
// Some Parquet writers (e.g. Snowflake) store FIXED_LEN_BYTE_ARRAY as
874+
// Arrow Binary rather than FixedSizeBinary. Allow Binary -> Fixed(N)
875+
// since the underlying bytes are the same.
876+
(Some(PrimitiveType::Binary), Some(PrimitiveType::Fixed(_))) => true,
873877
_ => false,
874878
}
875879
}

0 commit comments

Comments
 (0)