LuciferYang commented on a change in pull request #29434:
URL: https://github.com/apache/spark/pull/29434#discussion_r471899486
##########
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:
need to try, there is no good idea now.
----------------------------------------------------------------
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]