Github user mgaido91 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19714#discussion_r150255560
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala ---
    @@ -154,12 +158,12 @@ abstract class SparkStrategies extends 
QueryPlanner[SparkPlan] {
           // --- BroadcastHashJoin 
--------------------------------------------------------------------
     
           case ExtractEquiJoinKeys(joinType, leftKeys, rightKeys, condition, 
left, right)
    -        if canBuildRight(joinType) && canBroadcast(right) =>
    +        if canBuildRight(joinType) && canBroadcast(right, 
left.stats.hints.broadcast) =>
    --- End diff --
    
    What about just adding here `&& !left.stats.hints.broadcast`? In this way 
we are not changing the `canBroadcast` method which is not really readable 
after the change.


---

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

Reply via email to