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 2018/12/25 18:32:46 UTC

[GitHub] mgaido91 commented on a change in pull request #22284: [SPARK-25278][SQL] Avoid duplicated Exec nodes when the same logical plan appears in the query

mgaido91 commented on a change in pull request #22284: [SPARK-25278][SQL] Avoid duplicated Exec nodes when the same logical plan appears in the query
URL: https://github.com/apache/spark/pull/22284#discussion_r243921399
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/planning/QueryPlanner.scala
 ##########
 @@ -81,7 +81,7 @@ abstract class QueryPlanner[PhysicalPlan <: TreeNode[PhysicalPlan]] {
               childPlans.map { childPlan =>
                 // Replace the placeholder by the child plan
                 candidateWithPlaceholders.transformUp {
-                  case p if p == placeholder => childPlan
+                  case p if p.eq(placeholder) => childPlan
 
 Review comment:
   moreover, I am not sure if there are other cases which result in `==` being true when `eq` isn't and I'd argue that it is very hard to ensure such a thing. So I think this fix would be anyway needed.

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