viirya commented on code in PR #5015:
URL: https://github.com/apache/arrow-rs/pull/5015#discussion_r1380562943
##########
arrow-cast/src/cast.rs:
##########
@@ -2317,6 +2341,23 @@ 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>::with_capacity(array.len(),
array.values().inner().capacity());
Review Comment:
Hmm, my concern is that other type casting doesn't reuse buffer (or do we?),
users expect that cast kernel returns an array with new buffer.
--
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]