sam-1112 commented on code in PR #3632:
URL: https://github.com/apache/iceberg-rust/pull/3632#discussion_r4681415621
##########
crates/iceberg/src/arrow/int96.rs:
##########
@@ -44,66 +50,69 @@ use crate::{Error, ErrorKind};
pub(crate) fn coerce_int96_timestamps(
arrow_schema: &ArrowSchemaRef,
iceberg_schema: &Schema,
-) -> Option<Arc<ArrowSchema>> {
- let mut visitor = Int96CoercionVisitor::new(iceberg_schema);
- let coerced = visit_schema(arrow_schema, &mut visitor).ok()?;
- if visitor.changed {
- Some(Arc::new(coerced))
- } else {
- None
+ parquet_schema: &SchemaDescriptor,
+) -> Result<Option<Arc<ArrowSchema>>> {
+ if !parquet_schema
+ .columns()
+ .iter()
+ .any(|column| column.physical_type() == PhysicalType::INT96)
+ {
+ return Ok(None);
}
+ let mut visitor = Int96CoercionVisitor::new(iceberg_schema,
parquet_schema);
+ let coerced = visit_schema(arrow_schema, &mut visitor)?;
Review Comment:
Added the `with_field_ids loop` to
`test_read_int96_with_unselected_list_views`. Both list-view types now cover
embedded field IDs and name mapping, including the nested `items.element`
mapping. Both `id` and `ts`, `id` projections match the expected batches.
--
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]