You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2023/02/06 15:18:00 UTC
[jira] [Assigned] (SPARK-42360) Transform LeftOuter join with IsNull filter on right side to Anti join
[ https://issues.apache.org/jira/browse/SPARK-42360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-42360:
------------------------------------
Assignee: Apache Spark
> Transform LeftOuter join with IsNull filter on right side to Anti join
> ----------------------------------------------------------------------
>
> Key: SPARK-42360
> URL: https://issues.apache.org/jira/browse/SPARK-42360
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 3.3.1
> Reporter: Wan Kun
> Assignee: Apache Spark
> Priority: Minor
>
> Optimize left outer join to anti join if exists IsNull filter on the right side.
> For example, query
> {code:sql}
> SELECT t1.*
> FROM t1 LEFT JOIN t2
> ON t1.id = t2.id
> WHERE t2.id is null and t1.id = 1 and Rand() < 0.5
> {code}
> can be optimized to
> {code:sql}
> SELECT t1.*
> FROM t1 LEFT ANTI JOIN t2
> ON t1.id = t2.id
> WHERE t1.id = 1 and Rand() < 0.5
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org