[ 
https://issues.apache.org/jira/browse/SPARK-22916?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apache Spark reassigned SPARK-22916:
------------------------------------

    Assignee:     (was: Apache Spark)

> shouldn't bias towards build right if user does not specify
> -----------------------------------------------------------
>
>                 Key: SPARK-22916
>                 URL: https://issues.apache.org/jira/browse/SPARK-22916
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.3.0
>            Reporter: Feng Liu
>
> This is an issue very similar to SPARK-22489. When there are no broadcast 
> hints, the current spark strategies will prefer to build right, without 
> considering the sizes of the two sides. To reproduce:
> {code:java}
> import org.apache.spark.sql.execution.joins.BroadcastHashJoinExec
> spark.createDataFrame(Seq((1, "4"), (2, "2"))).toDF("key", 
> "value").createTempView("table1")
> spark.createDataFrame(Seq((1, "1"), (2, "2"), (3, "3"))).toDF("key", 
> "value").createTempView("table2")
> val bl = sql(s"SELECT * FROM table1 t1 JOIN table2 t2 ON t1.key = 
> t2.key").queryExecution.executedPlan
> {code}
> The plan is going to broadcast right side (`t2`), even though it is larger.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to