You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/12/21 00:46:02 UTC

[GitHub] [spark] Yaohua628 commented on a change in pull request #34575: [SPARK-37273][SQL] Support hidden file metadata columns in Spark SQL

Yaohua628 commented on a change in pull request #34575:
URL: https://github.com/apache/spark/pull/34575#discussion_r772754324



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/SchemaPruning.scala
##########
@@ -164,7 +164,12 @@ object SchemaPruning extends Rule[LogicalPlan] {
       outputRelation: LogicalRelation,
       prunedBaseRelation: HadoopFsRelation) = {
     val prunedOutput = getPrunedOutput(outputRelation.output, prunedBaseRelation.schema)
-    outputRelation.copy(relation = prunedBaseRelation, output = prunedOutput)
+    // also add the metadata output if any
+    // TODO: should be able to prune the metadata schema

Review comment:
       actually no:
   1. this rule supports only: `Parquet` + `ORC` and controls by a flag `spark.sql.optimizer.nestedSchemaPruning.enabled`
   2. this rule only prunes the data schema (comparing the data schema with the project + filter)
   
   I am thinking:
   - refactor this rule to prune metadata
   OR
   - make a new rule `MetadataSchemaPruning`
   OR
   - prune the metadata at `FileSourceStrategy` (might be hacky)




-- 
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: reviews-unsubscribe@spark.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org