[
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: [email protected]
For additional commands, e-mail: [email protected]