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


##########
datafusion/physical-expr/src/functions.rs:
##########
@@ -608,6 +608,27 @@ pub fn create_physical_fun(
                 _ => unreachable!(),
             },
         }),
+        BuiltinScalarFunction::RegexpLike => Arc::new(|args| match 
args[0].data_type() {
+            DataType::Utf8 => {
+                let func = invoke_on_array_if_regex_expressions_feature_flag!(
+                    regexp_like,
+                    i32,
+                    "regexp_like"
+                );
+                make_scalar_function_inner(func)(args)
+            }
+            DataType::LargeUtf8 => {
+                let func = invoke_on_array_if_regex_expressions_feature_flag!(
+                    regexp_like,
+                    i64,
+                    "regexp_like"
+                );
+                make_scalar_function_inner(func)(args)
+            }
+            other => {
+                internal_err!("Unsupported data type {other:?} for function 
regexp_like")

Review Comment:
   That would be most appreciated. Cleaning up internal errors that are 
possible to trigger via incrrect queries (rather than a bug( is very good 
improvement



##########
datafusion/physical-expr/src/functions.rs:
##########
@@ -608,6 +608,27 @@ pub fn create_physical_fun(
                 _ => unreachable!(),
             },
         }),
+        BuiltinScalarFunction::RegexpLike => Arc::new(|args| match 
args[0].data_type() {
+            DataType::Utf8 => {
+                let func = invoke_on_array_if_regex_expressions_feature_flag!(
+                    regexp_like,
+                    i32,
+                    "regexp_like"
+                );
+                make_scalar_function_inner(func)(args)
+            }
+            DataType::LargeUtf8 => {
+                let func = invoke_on_array_if_regex_expressions_feature_flag!(
+                    regexp_like,
+                    i64,
+                    "regexp_like"
+                );
+                make_scalar_function_inner(func)(args)
+            }
+            other => {
+                internal_err!("Unsupported data type {other:?} for function 
regexp_like")

Review Comment:
   That would be most appreciated. Cleaning up internal errors that are 
possible to trigger via incrrect queries (rather than a bug) is very good 
improvement



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