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 2020/10/28 17:56:01 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #30173: [SPARK-33272][SQL] prune the attributes mapping in QueryPlan.transformUpWithNewOutput

cloud-fan commented on a change in pull request #30173:
URL: https://github.com/apache/spark/pull/30173#discussion_r513650549



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/QueryPlan.scala
##########
@@ -180,10 +180,14 @@ abstract class QueryPlan[PlanType <: QueryPlan[PlanType]] extends TreeNode[PlanT
    *             rewrite attribute references in the parent nodes.
    * @param skipCond a boolean condition to indicate if we can skip transforming a plan node to save
    *                 time.
+   * @param canGetOutput a boolean condition to indicate if we can get the output of a plan node
+   *                     to prune the attributes mapping to be propagated. The default value is true
+   *                     as only unresolved logical plan can't get output.

Review comment:
       Do you mean something like
   ```
   val canGetOutput = plan match {
     case l: LogicalPlan => l.resolved
     case _ => true
   }
   ```
   then we can remove `skipCond` as well by matching `AnalysisHelper`.




----------------------------------------------------------------
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.

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