viirya commented on a change in pull request #23474: [SPARK-26551][SQL] Fix 
schema pruning error when selecting one complex field and having is not null 
predicate on another one
URL: https://github.com/apache/spark/pull/23474#discussion_r245546678
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaPruning.scala
 ##########
 @@ -40,11 +40,19 @@ private[sql] object ParquetSchemaPruning extends 
Rule[LogicalPlan] {
       plan
     }
 
+  // `PhysicalOperation` pattern returns relation operator's outputs if there 
is no
+  // projects on it. In this case, we don't need to do schema pruning.
+  private def directOutput(projects: Seq[NamedExpression], plan: LogicalPlan): 
Boolean = {
 
 Review comment:
   My second thought is, maybe we can keep this.
   
   The reason is we can skip unnecessary transforming. Now this rule applies on 
filter and underlying relation too. It is unnecessary.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to