edmondop commented on code in PR #11753:
URL: https://github.com/apache/datafusion/pull/11753#discussion_r1707375608


##########
datafusion/functions/src/regex/regexpmatch.rs:
##########
@@ -74,17 +74,9 @@ impl ScalarUDFImpl for RegexpMatchFunc {
     }
 
     fn return_type(&self, arg_types: &[DataType]) -> Result<DataType> {
-        use DataType::*;
-

Review Comment:
   Seems like #11618 is striking again 😂



##########
datafusion/functions/src/regex/regexplike.rs:
##########
@@ -75,13 +75,8 @@ impl ScalarUDFImpl for RegexpLikeFunc {
         use DataType::*;
 
         Ok(match &arg_types[0] {
-            LargeUtf8 | Utf8 => Boolean,
             Null => Null,
-            other => {
-                return plan_err!(
-                    "The regexp_like function can only accept strings. Got 
{other}"
-                );
-            }
+            _ => Boolean,

Review Comment:
   Seems #11618 is striking again. I think @alamb is right, but it is very 
counter intuitive to return a Boolean because that case shouldn't exists.
   
   Should we use 'unreachable!' ?



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