You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2018/01/29 02:04:00 UTC

[jira] [Commented] (SPARK-22916) shouldn't bias towards build right if user does not specify

    [ https://issues.apache.org/jira/browse/SPARK-22916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16342821#comment-16342821 ] 

Apache Spark commented on SPARK-22916:
--------------------------------------

User 'gatorsmile' has created a pull request for this issue:
https://github.com/apache/spark/pull/20420

> 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
>            Assignee: Feng Liu
>            Priority: Major
>             Fix For: 2.3.0
>
>
> 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
(v7.6.3#76005)

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