Github user mgaido91 commented on a diff in the pull request:
https://github.com/apache/spark/pull/22008#discussion_r208831933
--- 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 --
Because this doesn't reorder the Join order, but it just swaps the two
sides of a cross join.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]