You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Weijun-H (via GitHub)" <gi...@apache.org> on 2023/04/01 12:30:27 UTC

[GitHub] [arrow-datafusion] Weijun-H commented on a diff in pull request #5819: feat: Add expression rewrite rules for LIKE and ILIKE

Weijun-H commented on code in PR #5819:
URL: https://github.com/apache/arrow-datafusion/pull/5819#discussion_r1155105069


##########
datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs:
##########
@@ -2851,4 +2838,70 @@ mod tests {
             or(col("c2").lt(lit(3)), col("c2").gt(lit(4)))
         );
     }
+
+    #[test]
+    fn test_like_and_ilke() {
+        // test non-null values
+        let expr = Expr::Like(Like::new(
+            false,
+            Box::new(col("c1")),
+            Box::new(lit("%")),
+            None,
+        ));

Review Comment:
   Yes, it is a better way. I forgot to use it 😄



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org