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


##########
datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs:
##########
@@ -390,6 +390,22 @@ impl<'a, S: SimplifyInfo> ExprRewriter for Simplifier<'a, 
S> {
                 lit(negated)
             }
 
+            // expr IN ((subquery)) -> expr IN (subquery), see ##5529

Review Comment:
   👍 



##########
datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs:
##########
@@ -2849,6 +2866,24 @@ mod tests {
             simplify(in_list(col("c1"), vec![lit(1), lit(2)], true)),
             col("c1").not_eq(lit(2)).and(col("c1").not_eq(lit(1)))
         );
+
+        let subquery = Arc::new(test_table_scan_with_name("test").unwrap());

Review Comment:
   Can you please also add a negative test (with two subqueries)?
   
   



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