alamb commented on code in PR #26548:
URL: https://github.com/apache/datafusion/pull/26548#discussion_r4337739617


##########
datafusion/optimizer/src/eliminate_filter.rs:
##########
@@ -113,10 +114,54 @@ fn simplify_filter_predicate(expr: Expr) -> 
SimplifiedFilterPredicate {
         Expr::BinaryExpr(binary) if binary.op == Operator::Or => {
             simplify_filter_or(*binary.left, *binary.right)
         }
+        Expr::InList(in_list) if in_list.list.iter().any(is_null_literal) => {

Review Comment:
   can we also update the comments to explain the new simplification?
   
   



##########
datafusion/optimizer/src/eliminate_filter.rs:
##########
@@ -495,4 +540,85 @@ mod tests {
           EmptyRelation: rows=0
         ")
     }
+
+    #[test]

Review Comment:
   can you please add end to end .slt tests rather than unit tests here? 



##########
datafusion/optimizer/src/eliminate_filter.rs:
##########
@@ -113,10 +114,54 @@ fn simplify_filter_predicate(expr: Expr) -> 
SimplifiedFilterPredicate {
         Expr::BinaryExpr(binary) if binary.op == Operator::Or => {
             simplify_filter_or(*binary.left, *binary.right)
         }
+        Expr::InList(in_list) if in_list.list.iter().any(is_null_literal) => {

Review Comment:
   Also rather than first checking is_null_literal, I think it could make sense 
to simply try the rewrite always



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to