tustvold commented on code in PR #5015:
URL: https://github.com/apache/arrow-rs/pull/5015#discussion_r1378498771


##########
arrow-cast/src/cast.rs:
##########
@@ -2317,6 +2341,22 @@ fn value_to_string<O: OffsetSizeTrait>(
     Ok(Arc::new(builder.finish()))
 }
 
+fn cast_numeric_to_binary<FROM: ArrowPrimitiveType, O: OffsetSizeTrait>(
+    array: &dyn Array,
+) -> Result<ArrayRef, ArrowError> {
+    let array = array.as_primitive::<FROM>();
+
+    let mut builder = GenericBinaryBuilder::<O>::new();

Review Comment:
   You could possibly initialize the correct capacity 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]

Reply via email to