Github user maropu commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22284#discussion_r214300480
  
    --- Diff: 
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
    --- End diff --
    
    nvm, just a quesion. I was thinking why we couldn't write here like;
    ```
    trait PlaceHolder;
    case class PlanLater extends LeafExecNode with PlaceHolder;
    ```
    then,
    ```
    candidateWithPlaceholders.transformUp {
      case p: PlaceHolder if p.eq(placeholder) => childPlan
    }
    ```


---

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

Reply via email to