viirya commented on code in PR #3482:
URL: https://github.com/apache/arrow-rs/pull/3482#discussion_r1066112759


##########
arrow-cast/src/cast.rs:
##########
@@ -3285,6 +3285,8 @@ fn cast_to_dictionary<K: ArrowDictionaryKeyType>(
         ),
         Utf8 => pack_string_to_dictionary::<K>(array, cast_options),
         LargeUtf8 => pack_string_to_dictionary::<K>(array, cast_options),
+        Binary => pack_binary_to_dictionary::<K>(array, cast_options),
+        LargeBinary => pack_binary_to_dictionary::<K>(array, cast_options),

Review Comment:
   Like `pack_string_to_dictionary`, they both perform casting first to get 
`StringArray`/`BinaryArray` which is taken to build dictionary array. I think 
we can simplify this by removing first casting. I will do it in a follow up pr.



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

Reply via email to