kosiew commented on code in PR #18998:
URL: https://github.com/apache/datafusion/pull/18998#discussion_r2581191718
##########
datafusion/datasource-parquet/src/row_filter.rs:
##########
@@ -270,10 +233,12 @@ impl FilterCandidateBuilder {
.project(&required_indices_into_table_schema)?,
);
- let (schema_mapper, projection_into_file_schema) = self
- .schema_adapter_factory
- .create(Arc::clone(&projected_table_schema), self.table_schema)
- .map_schema(&self.file_schema)?;
+ // Compute the projection into the file schema by matching column names
+ let projection_into_file_schema: Vec<usize> = projected_table_schema
+ .fields()
+ .iter()
+ .filter_map(|f| self.file_schema.index_of(f.name()).ok())
+ .collect();
Review Comment:
https://github.com/apache/datafusion/commit/66df4f27f67d285aaf50dd0e0208bca3b06a5c7c
are excellent projection tests for:
flipped order (c,b,a) vs (a,b,c), and
missing column (a,c) vs (a,b,c)
The tests for pruning / row filter path are still missing.
--
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]