alamb commented on code in PR #8691:
URL: https://github.com/apache/arrow-datafusion/pull/8691#discussion_r1439064211


##########
datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs:
##########
@@ -481,6 +481,14 @@ impl<'a, S: SimplifyInfo> TreeNodeRewriter for 
Simplifier<'a, S> {
                 lit(negated)
             }
 
+            // null in (x, y, z) --> null

Review Comment:
   I double checked that this is consistent with posgres: 
   
   ```sql
   postgres=# select null IN (1,2);
    ?column?
   ----------
   
   (1 row)
   
   postgres=# select null IN (NULL);
    ?column?
   ----------
   
   (1 row)
   
   postgres=# select null NOT IN (1,2);
    ?column?
   ----------
   
   (1 row)
   
   postgres=# select null NOT IN (NULL,1,2);
    ?column?
   ----------
   
   (1 row)
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to