cloud-fan commented on a change in pull request #25703: [SPARK-29002][SQL] 
Avoid changing SMJ to BHJ if the build side has a high ratio of empty partitions
URL: https://github.com/apache/spark/pull/25703#discussion_r321570150
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala
 ##########
 @@ -291,7 +291,9 @@ abstract class SparkStrategies extends 
QueryPlanner[SparkPlan] {
         }
 
         def createJoinWithoutHint() = {
-          createBroadcastHashJoin(canBroadcast(left), canBroadcast(right))
+          createBroadcastHashJoin(
+            canBroadcast(left) && 
!hint.leftHint.exists(_.strategy.contains(NO_BROADCAST_HASH)),
+            canBroadcast(right) && 
!hint.rightHint.exists(_.strategy.contains(NO_BROADCAST_HASH)))
 
 Review comment:
   I think this one is OK as it's only used twice and is specific to AQE

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to