You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "zanmato1984 (via GitHub)" <gi...@apache.org> on 2024/12/02 16:47:46 UTC

Re: [PR] GH-44866: [C++] Minor enhance the doc and impl of DictionaryArray::Transpose [arrow]

zanmato1984 commented on code in PR #44867:
URL: https://github.com/apache/arrow/pull/44867#discussion_r1865585194


##########
cpp/src/arrow/array/array_dict.cc:
##########
@@ -320,7 +320,7 @@ Result<std::shared_ptr<Array>> DictionaryArray::Transpose(
   ARROW_ASSIGN_OR_RAISE(auto transposed,
                         TransposeDictIndices(data_, data_->type, type, dictionary->data(),
                                              transpose_map, pool));
-  return MakeArray(std::move(transposed));
+  return MakeArray(transposed);

Review Comment:
   I think an ineffective `std::move` could be misleading in terms of readability (though not harmful to performance). Plus, suppose someone enhanced `MakeArray` by accepting an rvalue parameter someday, that guy will likely revisit all the call-sites and add the (effective) `std::move` then?



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