dwsmith1983 commented on code in PR #5654:
URL: https://github.com/apache/datafusion-comet/pull/5654#discussion_r4100214250
##########
native/core/src/parquet/cast_column.rs:
##########
@@ -270,12 +284,22 @@ impl PhysicalExpr for CometCastColumnExpr {
let input_physical_field = self.input_physical_field.data_type();
let target_field = self.target_field.data_type();
+ // Relabeling only swaps metadata, so it is right when every requested
field reads
+ // the file field at its own position. A mapping that reorders fields
(ids resolved
+ // to other positions) has to go through the nested conversion below.
+ let positional = self
Review Comment:
Done that way. `types_differ_only_in_field_names` takes `use_field_id` and
its struct arm requires `!use_field_id || field_id(lf).is_none() ||
field_id(lf) == field_id(pf)` per pair, with `use_field_id` read from the
parquet options. The result is computed once into a `relabel_only` bool, in
`try_new` without ids and again in `with_parquet_options` with the options'
`use_field_id`, so `evaluate` no longer walks the type tree per batch.
`FieldMapping` is gone, so `parquet_options` is the only `Option` left on the
expression.
--
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]