jayzhan211 commented on code in PR #15299:
URL: https://github.com/apache/datafusion/pull/15299#discussion_r2002218628


##########
datafusion/optimizer/src/simplify_expressions/regex.rs:
##########
@@ -43,6 +45,23 @@ pub fn simplify_regex_expr(
     let mode = OperatorMode::new(&op);
 
     if let Expr::Literal(ScalarValue::Utf8(Some(pattern))) = right.as_ref() {
+        // Handle the special case for ".*" pattern
+        if pattern == ".*" {

Review Comment:
   We can make this an const similar to `COUNT_STAR_EXPANSION`



##########
datafusion/optimizer/src/simplify_expressions/regex.rs:
##########
@@ -43,6 +45,23 @@ pub fn simplify_regex_expr(
     let mode = OperatorMode::new(&op);
 
     if let Expr::Literal(ScalarValue::Utf8(Some(pattern))) = right.as_ref() {
+        // Handle the special case for ".*" pattern
+        if pattern == ".*" {

Review Comment:
   We can make this a const similar to `COUNT_STAR_EXPANSION`



-- 
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-unsubscr...@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to