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 2019/05/17 01:32:47 UTC

[GitHub] [spark] viirya commented on a change in pull request #24626: [SPARK-27747][SQL] add a logical plan link in the physical plan

viirya commented on a change in pull request #24626: [SPARK-27747][SQL] add a logical plan link in the physical plan
URL: https://github.com/apache/spark/pull/24626#discussion_r284951277
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala
 ##########
 @@ -280,9 +297,15 @@ abstract class TreeNode[BaseType <: TreeNode[BaseType]] extends Product {
         rule.applyOrElse(this, identity[BaseType])
 
 Review comment:
   Here after applying the `rule`, we need to carry over the tags, if needed, too.
   
   Since carrying the tags in both if and else branches, so maybe:
   
   ```scala
   val newNode = if (this fastEquals afterRuleOnChildren) {
     CurrentOrigin.withOrigin(origin) {
       rule.applyOrElse(this, identity[BaseType])
     }
   } else {
     CurrentOrigin.withOrigin(origin) {
       rule.applyOrElse(afterRuleOnChildren, identity[BaseType])
     }
   }
   
   // carrying over the tags to newNode...
   ```

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


With regards,
Apache Git Services

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