You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "EdisonWang (Jira)" <ji...@apache.org> on 2019/12/01 09:58:00 UTC
[jira] [Created] (SPARK-30088) Adaptive execution should convert
SortMergeJoin to BroadcastJoin when plan generates empty result
EdisonWang created SPARK-30088:
----------------------------------
Summary: 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.0.0
Reporter: EdisonWang
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