You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dongjoon Hyun (Jira)" <ji...@apache.org> on 2020/03/16 22:51:06 UTC
[jira] [Updated] (SPARK-30088) Adaptive execution should convert
SortMergeJoin to BroadcastJoin when plan generates empty result
[ https://issues.apache.org/jira/browse/SPARK-30088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dongjoon Hyun updated SPARK-30088:
----------------------------------
Affects Version/s: (was: 3.0.0)
3.1.0
> Adaptive execution should convert SortMergeJoin to BroadcastJoin when plan generates empty result
> -------------------------------------------------------------------------------------------------
>
> Key: SPARK-30088
> URL: https://issues.apache.org/jira/browse/SPARK-30088
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 3.1.0
> Reporter: EdisonWang
> Priority: Minor
>
> Adaptive execution try to convert SortMergeJoin to BroadcastJoin by checking the `dataSize` metrics of spark plan. However, if the spark plan generates empty result, the `dataSize` metrics is empty due to SQLMetrics's initial value is -1, which could lead to the following check return false
> ```
> private def canBroadcast(plan: LogicalPlan): Boolean = {
> plan.stats.sizeInBytes >= 0 && plan.stats.sizeInBytes <= conf.autoBroadcastJoinThreshold
> }
> ```
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org