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


##########
datafusion/functions/src/unicode/reverse.rs:
##########
@@ -83,10 +85,17 @@ impl ScalarUDFImpl for ReverseFunc {
 /// reverse('abcde') = 'edcba'
 /// The implementation uses UTF-8 code points as characters
 pub fn reverse<T: OffsetSizeTrait>(args: &[ArrayRef]) -> Result<ArrayRef> {
-    let string_array = as_generic_string_array::<T>(&args[0])?;
+    if args[0].data_type() == &Utf8View {

Review Comment:
   as in using a match? Sure. It won't be the same match arms though.



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