Omega359 commented on code in PR #20624:
URL: https://github.com/apache/datafusion/pull/20624#discussion_r2874850638


##########
datafusion/functions/src/unicode/translate.rs:
##########
@@ -93,7 +94,11 @@ impl ScalarUDFImpl for TranslateFunc {
     }
 
     fn return_type(&self, arg_types: &[DataType]) -> Result<DataType> {
-        utf8_to_str_type(&arg_types[0], "translate")
+        if arg_types[0] == DataType::Utf8View {
+            Ok(DataType::Utf8View)
+        } else {
+            utf8_to_str_type(&arg_types[0], "translate")
+        }

Review Comment:
   ... and if args_type[0] was Int32Type, etc? I am not sure this is the 
correct approach here.



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