You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/02/06 19:38:23 UTC

[GitHub] [arrow-rs] alamb commented on a diff in pull request #3667: Use dyn Array in cast kernels

alamb commented on code in PR #3667:
URL: https://github.com/apache/arrow-rs/pull/3667#discussion_r1097837588


##########
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 one in particular I think is used frequently. I think its additional overhead should be low enough though.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org