Github user chenghao-intel commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1238#discussion_r14544542
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala ---
    @@ -61,8 +61,6 @@ private[sql] abstract class SparkStrategies extends 
QueryPlanner[SparkPlan] {
           condition.map(Filter(_, 
broadcastHashJoin)).getOrElse(broadcastHashJoin) :: Nil
         }
     
    -    def broadcastTables: Seq[String] = 
sqlContext.joinBroadcastTables.split(",").toBuffer
    -
         def apply(plan: LogicalPlan): Seq[SparkPlan] = plan match {
    --- End diff --
    
    I think this probably has 2 rules for size estimated JOIN if I understand 
correctly:
    * if size estimates less than a threshold, we can convert it into a 
BroadcastNestedLoopJoin
    * In equi-join(InnerJoin), if the left estimates size less than right, we 
should `BuildLeft`, otherwise `BuildRight`
    
    We have the first implemented, but we probably need second also. And should 
we add an option to disable the size estimates based strategy?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to