srowen commented on a change in pull request #29434:
URL: https://github.com/apache/spark/pull/29434#discussion_r471574319



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/CostBasedJoinReorder.scala
##########
@@ -206,14 +206,14 @@ object JoinReorderDP extends PredicateHelper with Logging 
{
     // For the lower level k, we only need to search from 0 to lev - k, 
because when building
     // a join from A and B, both A J B and B J A are handled.
     while (k <= lev - k) {
-      val oneSideCandidates = existingLevels(k).values.toSeq
+      val oneSideCandidates = 
existingLevels(k).values.toSeq.sortBy(_.itemIds.head)

Review comment:
       Ah, is this the only way to make it deterministic? I was hoping we could 
make the test assertions deterministic with a sort without changing the 
underlying logic. This may have a performance penalty.

##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/ArrayBasedMapData.scala
##########
@@ -136,7 +136,8 @@ object ArrayBasedMapData {
     keys.zip(values).toMap
   }
 
-  def toScalaMap(keys: Seq[Any], values: Seq[Any]): Map[Any, Any] = {
+  def toScalaMap(keys: scala.collection.Seq[Any],

Review comment:
       Does this has to accept s.c.Seq?




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