[ 
https://issues.apache.org/jira/browse/SPARK-36665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17487200#comment-17487200
 ] 

Anton Okolnychyi commented on SPARK-36665:
------------------------------------------

[~kazuyukitanimura] {{RewritePredicateSubquery}} still rewrites the predicate 
subquery but it is IN subquery instead of NOT IN. In SQL, NOT IN subquery have 
to be treated in a special way. As a result, we are getting wrong query results 
right now.

> Add more Not operator optimizations
> -----------------------------------
>
>                 Key: SPARK-36665
>                 URL: https://issues.apache.org/jira/browse/SPARK-36665
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.3.0
>            Reporter: Kazuyuki Tanimura
>            Assignee: Kazuyuki Tanimura
>            Priority: Major
>             Fix For: 3.3.0
>
>         Attachments: Pasted Graphic 3.png
>
>
> {{BooleanSimplification should be able to do more simplifications for Not 
> operators applying following rules}}
>  # {{Not(null) == null}}
>  ## {{e.g. IsNull(Not(...)) can be IsNull(...)}}
>  # {{(Not(a) = b) == (a = Not(b))}}
>  ## {{e.g. Not(...) = true can be (...) = false}}
>  # {{(a != b) == (a = Not(b))}}
>  ## {{e.g. (...) != true can be (...) = false}}



--
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

Reply via email to