You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yuming Wang (Jira)" <ji...@apache.org> on 2021/03/20 12:59:00 UTC
[jira] [Assigned] (SPARK-34808) Removes outer join if it only has
distinct on streamed side
[ https://issues.apache.org/jira/browse/SPARK-34808?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yuming Wang reassigned SPARK-34808:
-----------------------------------
Assignee: (was: Yuming Wang)
> Removes outer join if it only has distinct on streamed side
> -----------------------------------------------------------
>
> Key: SPARK-34808
> URL: https://issues.apache.org/jira/browse/SPARK-34808
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 3.2.0
> Reporter: Yuming Wang
> Priority: Major
>
> For example:
> {code:scala}
> spark.range(200L).selectExpr("id AS a").createTempView("t1")
> spark.range(300L).selectExpr("id AS b").createTempView("t2")
> spark.sql("SELECT DISTINCT a FROM t1 LEFT JOIN t2 ON a = b").explain(true)
> {code}
> Current optimized plan:
> {noformat}
> == Optimized Logical Plan ==
> Aggregate [a#2L], [a#2L]
> +- Project [a#2L]
> +- Join LeftOuter, (a#2L = b#6L)
> :- Project [id#0L AS a#2L]
> : +- Range (0, 200, step=1, splits=Some(2))
> +- Project [id#4L AS b#6L]
> +- Range (0, 300, step=1, splits=Some(2))
> {noformat}
> Expected optimized plan:
> {noformat}
> == Optimized Logical Plan ==
> Aggregate [a#2L], [a#2L]
> +- Project [id#0L AS a#2L]
> +- Range (0, 200, step=1, splits=Some(2))
> {noformat}
>
--
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