dwsmith1983 commented on code in PR #6116:
URL: https://github.com/apache/datafusion-comet/pull/6116#discussion_r4100357570
##########
native/core/src/parquet/parquet_exec.rs:
##########
@@ -102,6 +102,11 @@ pub(crate) fn init_datasource_exec(
);
spark_parquet_options.use_field_id = use_field_id;
spark_parquet_options.ignore_missing_field_id = ignore_missing_field_id;
+ // Spark runs its missing-id check against the pruned read schema it hands
the reader, not
+ // the full data schema that DataFusion later passes the schema adapter,
so the answer is
+ // taken from `required_schema` here, once per scan, and handed to the
reader factory below.
+ spark_parquet_options.requested_schema_has_field_ids =
+ any_nested_field_has_id(required_schema.fields());
Review Comment:
Done. `CometNativeScan` now sends `require_field_ids` in field 16, computed
as `ParquetUtils.hasFieldIds(scan.requiredSchema) && !ignoreMissing` next to
the existing `useFieldId`. `any_nested_field_has_id`, `field_holds_id`,
`list_element_field` and their test are gone, so the native side no longer
walks the requested schema.
--
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]