gatorsmile commented on a change in pull request #29711:
URL: https://github.com/apache/spark/pull/29711#discussion_r486433621



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/CostBasedJoinReorder.scala
##########
@@ -316,7 +323,7 @@ object JoinReorderDP extends PredicateHelper with Logging {
   }
 
   /** Map[set of item ids, join plan for these items] */
-  type JoinPlanMap = Map[Set[Int], JoinPlan]
+  type JoinPlanMap = mutable.LinkedHashMap[Set[Int], JoinPlan]

Review comment:
       > Change to use LinkedHashMap instead of Map to store foundPlans in 
JoinReorderDP.search method to ensure same iteration order with same insert 
order because iteration order of Map behave differently under Scala 2.12 and 
2.13
   
   Can we make it as a separate PR? The plan changes need more reviews




----------------------------------------------------------------
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:
[email protected]



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

Reply via email to