MassivePizza commented on code in PR #12318:
URL: https://github.com/apache/arrow-rs/pull/12318#discussion_r4665800904


##########
arrow-cast/src/cast/mod.rs:
##########
@@ -630,7 +630,8 @@ pub fn cast_with_options(
     let from_type = array.data_type();
     // clone array if types are the same
     if from_type == to_type {
-        return Ok(make_array(array.to_data()));
+        // TODO: Array::as_arc? 
https://github.com/apache/arrow-rs/issues/8794#issuecomment-3563886963

Review Comment:
   I think `to_arc` would also bring the time down since slicing recounts bits 
in `NullBuffer::slice` (see 
https://github.com/apache/arrow-rs/pull/12318#issuecomment-7052199941, which 
seems to be the source of 60ns vs 30ns diff).  



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