Weijun-H commented on code in PR #10908:
URL: https://github.com/apache/datafusion/pull/10908#discussion_r1642217621


##########
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:
   Why not use
   ```suggestion
                   compute_array_to_string(
                       arg,
                       any_dict_array.values().clone(),
                       delimiter.clone(),
                       null_string.clone(),
                       with_null_string,
                   )?;
   
                   Ok(arg)
   ```



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