advancedxy commented on code in PR #2668:
URL: https://github.com/apache/iceberg-rust/pull/2668#discussion_r3472327982
##########
crates/iceberg/src/arrow/record_batch_transformer.rs:
##########
@@ -359,6 +430,20 @@ impl RecordBatchTransformer {
let fields: Result<Vec<_>> = projected_iceberg_field_ids
.iter()
.map(|field_id| {
+ // Handle _partition struct column
+ if *field_id == RESERVED_FIELD_ID_PARTITION
+ && let Some(pc) = partition_column
+ {
+ let struct_type = DataType::Struct(pc.fields.clone());
+ let nullable = pc.fields.is_empty();
+ let arrow_field = Field::new("_partition", struct_type,
nullable)
Review Comment:
nit: should use RESERVED_COL_NAME_PARTITION in metadata_columns directly.
--
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]