[ https://issues.apache.org/jira/browse/SPARK-36665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17486829#comment-17486829 ]
Kazuyuki Tanimura commented on SPARK-36665: ------------------------------------------- [~aokolnychyi] Thank you for bringing this up. I would like to make sure if I understood the problem correctly, please bear with me. Example you posted is {quote}Not(Not(InSubquery(...)) <=> true) {quote} After the optimization, it is {quote}Not(InSubquery(...) <=> false) {quote} When you mention that "{{{}RewritePredicateSubquery{}}} does not rewrite...This leads to a wrong query result", did you mean that the query is suboptimal, or output values are wrong? > 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