You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "e1ijah1 (via GitHub)" <gi...@apache.org> on 2023/06/02 11:54:26 UTC

[GitHub] [arrow-datafusion] e1ijah1 commented on a diff in pull request #6458: feat: support type coercion in Parquet Reader

e1ijah1 commented on code in PR #6458:
URL: https://github.com/apache/arrow-datafusion/pull/6458#discussion_r1214279677


##########
datafusion/core/src/physical_plan/file_format/mod.rs:
##########
@@ -489,38 +491,93 @@ impl SchemaAdapter {
             field_mappings,
         })
     }
+
+    /// Creates a `SchemaMapping` that can be used to cast or map the columns from the file schema
+    /// to the table schema, taking into account the provided projections.
+    pub fn map_schema_with_projection(

Review Comment:
   I would like to suggest that `map_schema_with_projection` may not be directly implemented as `self.map_schema(file_schema.project(projections))`. In the `evolved_schema` test, some columns are processed as null arrays in `SchemaMapping.map_batch`. However, we could consider performing a projection on `table_schema` when creating `SchemaAdapter`.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org