c-thiel commented on code in PR #2188:
URL: https://github.com/apache/iceberg-rust/pull/2188#discussion_r3593282503
##########
crates/iceberg/src/arrow/schema.rs:
##########
@@ -692,6 +692,16 @@ impl SchemaVisitor for ToArrowSchemaConverter {
}
}
}
+
+ fn variant(&mut self, _v: &VariantType) ->
crate::Result<ArrowSchemaOrFieldOrType> {
+ // Variant is stored as a struct with two required binary fields (no
field IDs on sub-fields).
+ // Uses Binary (not LargeBinary) matching the Parquet BINARY primitive
directly.
+ let metadata_field = Field::new("metadata", DataType::Binary, false);
+ let value_field = Field::new("value", DataType::Binary, false);
Review Comment:
Done in
https://github.com/apache/iceberg-rust/pull/2188/commits/67109a88de34e37710adc9c5594d200e71c2b63d.
`value` is nullable now, and the field gets the extension type via
`with_extension_type`. I attach it in `field()` (variant() only returns the
bare `Struct{metadata,value}`, and the extension is a field property), using a
small `VariantExtensionType` impl with `NAME = "arrow.parquet.variant"`
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]