lidavidm commented on code in PR #12590: URL: https://github.com/apache/arrow/pull/12590#discussion_r841729577
########## cpp/src/arrow/compute/function.h: ########## @@ -205,7 +205,7 @@ class ARROW_EXPORT Function { const Arity& arity() const { return arity_; } /// \brief Return the function documentation - const FunctionDoc& doc() const { return *doc_; } + const FunctionDoc doc() const { return doc_; } Review Comment: No. We should delay copies as long as possible, and I suspect most of the time no copy is necessary. Const reference will prevent modification, just as it did before. -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org