thinkharderdev commented on a change in pull request #1622:
URL: https://github.com/apache/arrow-datafusion/pull/1622#discussion_r789968659
##########
File path: datafusion/src/physical_plan/file_format/parquet.rs
##########
@@ -385,9 +388,33 @@ fn build_row_group_predicate(
}
}
+// Map projections from the schema which merges all file schemas to
projections on a particular
+// file
+fn map_projections(
+ merged_schema: &Schema,
+ file_schema: &Schema,
+ projections: &[usize],
+) -> Vec<usize> {
+ if merged_schema.fields().len() == file_schema.fields().len() {
+ projections.to_vec()
+ } else {
+ let mut mapped: Vec<usize> = vec![];
+ for idx in projections {
+ let field = merged_schema.field(*idx);
+ if let Ok(mapped_idx) =
file_schema.index_of(field.name().as_str()) {
Review comment:
Done!
--
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]