EduardoVega commented on code in PR #10908:
URL: https://github.com/apache/datafusion/pull/10908#discussion_r1642751426


##########
datafusion/functions-array/src/string.rs:
##########
@@ -281,6 +281,31 @@ pub(super) fn array_to_string_inner(args: &[ArrayRef]) -> 
Result<ArrayRef> {
 
                 Ok(arg)
             }
+            Dictionary(..) => {
+                let any_dict_array = arr
+                    .as_any_dictionary_opt()
+                    .ok_or_else( || {
+                        DataFusionError::Internal(
+                            format!("could not cast {} to AnyDictionaryArray", 
arr.data_type())
+                        )
+                    })?;
+                macro_rules! array_function {
+                    ($ARRAY_TYPE:ident) => {
+                        to_string!(
+                            arg,
+                            any_dict_array.values(),
+                            &delimiter,
+                            &null_string,
+                            with_null_string,
+                            $ARRAY_TYPE
+                        )
+                    };
+                }
+                call_array_function!(
+                    any_dict_array.values().data_type(),
+                    false
+                )

Review Comment:
   I wanted to see if I could avoid calling again `compute_array_to_string` and 
instead compute the result and return inmediately, but calling 
`compute_array_to_string` is what other data types are doing, so makes sense to 
follow the same pattern.



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