[jira] [Commented] (SPARK-37292) Removes outer join if it only has DISTINCT on streamed side with alias
[ https://issues.apache.org/jira/browse/SPARK-37292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17442820#comment-17442820 ] Apache Spark commented on SPARK-37292: -- User 'wangyum' has created a pull request for this issue: https://github.com/apache/spark/pull/34573 > Removes outer join if it only has DISTINCT on streamed side with alias > -- > > Key: SPARK-37292 > URL: https://issues.apache.org/jira/browse/SPARK-37292 > Project: Spark > Issue Type: Improvement > Components: SQL >Affects Versions: 3.3.0 >Reporter: Yuming Wang >Assignee: Yuming Wang >Priority: Major > Fix For: 3.3.0 > > > {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 AS newAlias FROM t1 LEFT JOIN t2 ON a = > b").explain(true) > {code} > Expected optimized plan: > {noformat} > == Optimized Logical Plan == > Aggregate [newAlias#8L], [newAlias#8L] > +- Project [id#0L AS newAlias#8L] >+- Range (0, 200, step=1, splits=Some(2)) > {noformat} -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-37292) Removes outer join if it only has DISTINCT on streamed side with alias
[ https://issues.apache.org/jira/browse/SPARK-37292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17442288#comment-17442288 ] Apache Spark commented on SPARK-37292: -- User 'wangyum' has created a pull request for this issue: https://github.com/apache/spark/pull/34557 > Removes outer join if it only has DISTINCT on streamed side with alias > -- > > Key: SPARK-37292 > URL: https://issues.apache.org/jira/browse/SPARK-37292 > Project: Spark > Issue Type: Improvement > Components: SQL >Affects Versions: 3.3.0 >Reporter: Yuming Wang >Priority: Major > > {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 AS newAlias FROM t1 LEFT JOIN t2 ON a = > b").explain(true) > {code} > Expected optimized plan: > {noformat} > == Optimized Logical Plan == > Aggregate [newAlias#8L], [newAlias#8L] > +- Project [id#0L AS newAlias#8L] >+- Range (0, 200, step=1, splits=Some(2)) > {noformat} -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org