tustvold commented on code in PR #3667:
URL: https://github.com/apache/arrow-rs/pull/3667#discussion_r1097205458
##########
arrow-cast/src/cast.rs:
##########
@@ -609,7 +609,7 @@ pub fn cast_with_options(
// clone array if types are the same
if from_type == to_type {
- return Ok(array.clone());
+ return Ok(make_array(array.data().clone()));
Review Comment:
This is the only "downside", in practice cloning ArrayData is relied on to
be fast, it underpins array slicing, and so I think this is fine
--
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]