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

    https://github.com/apache/spark/pull/22008#discussion_r208372709
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
 ---
    @@ -158,8 +158,9 @@ abstract class Optimizer(sessionCatalog: SessionCatalog)
           ConvertToLocalRelation,
           PropagateEmptyRelation) :+
         // The following batch should be executed after batch "Join Reorder" 
and "LocalRelation".
    -    Batch("Check Cartesian Products", Once,
    -      CheckCartesianProducts) :+
    +    Batch("Check and Optimize Cartesian Products", Once,
    +      CheckCartesianProducts,
    +      ReorderCrossJoinOperands) :+
    --- End diff --
    
    This doesn't reorder the joins, but it just swaps the sides of a cartesian 
join, so there is no difference neither in the join order nor in any other 
aspect of what is the plan before or after it


---

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

Reply via email to