spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nattavut Sutyanyong (JIRA)" <>
Subject [jira] [Commented] (SPARK-16951) Alternative implementation of NOT IN to Anti-join
Date Tue, 09 Aug 2016 16:01:20 GMT


Nattavut Sutyanyong commented on SPARK-16951:

I found this [document|]
is the closest I can find discussing this very fine point in the reply to a question at October
02, 2002 - 10:25 am UTC

Because NULL means -- gee, I don't know.  (litterally, null means Unknown)

So, the predicate

where x not in ( NULL )

evaluates to neither TRUE, nor FALSE

ops$tkyte@ORA817DEV.US.ORACLE.COM> select * from dual where dummy not in ( NULL );

no rows selected

> Alternative implementation of NOT IN to Anti-join
> -------------------------------------------------
>                 Key: SPARK-16951
>                 URL:
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.0.0
>            Reporter: Nattavut Sutyanyong
> A transformation currently used to process {{NOT IN}} subquery is to rewrite to a form
of Anti-join with null-aware property in the Logical Plan and then translate to a form of
{{OR}} predicate joining the parent side and the subquery side of the {{NOT IN}}. As a result,
the presence of {{OR}} predicate is limited to the nested-loop join execution plan, which
will have a major performance implication if both sides' results are large.
> This JIRA sketches an idea of changing the OR predicate to a form similar to the technique
used in the implementation of the Existence join that addresses the problem of {{EXISTS (..)
OR ..}} type of queries.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message