LuciferYang opened a new pull request #29711:
URL: https://github.com/apache/spark/pull/29711


   ### What changes were proposed in this pull request?
   
   The optimization result of CostBasedJoinReorder maybe produce different 
result with same input with Scala 2.12 and Scala 2.13 if there are more than 
one same cost candidate plans.
   
   In this pr give a way to make it deterministic as much as possible, the main 
change of this pr as follow:
   
   - Iteration order of `Map` behave differently under Scala 2.12 and 2.13 with 
same inserted order, so in this pr change to use `LinkedHashMap` instead of 
`Map` to store `JoinPlanMap` in `JoinReorderDP.search` method to ensure this.
   
   - Fixed `StarJoinCostBasedReorderSuite` affected by the above change
   
   - Regenerate golden files affected by the above change.
   
   ### Why are the changes needed?
   We need to support a Scala 2.13 build.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   
   - Scala 2.12: Pass the Jenkins or GitHub Action
   
   - Scala 2.13: All tests passed.
   
   Do the following:
   
   ```
   dev/change-scala-version.sh 2.13
   mvn clean install -DskipTests  -pl sql/core -Pscala-2.13 -am
   mvn test -pl sql/core -Pscala-2.13
   ```
   https://github.com/apache/spark/pull/29689 fix some cases affected by 
SPARK-32755
   
   **Before**
   ```
   Tests: succeeded 8485, failed 13, canceled 1, ignored 52, pending 0
   *** 13 TESTS FAILED ***
   
   ```
   
   **After**
   
   ```
   Tests: succeeded 8498, failed 0, canceled 1, ignored 52, pending 0
   All tests passed.
   ```
   
   


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