pitrou commented on a change in pull request #10632: URL: https://github.com/apache/arrow/pull/10632#discussion_r662129264
########## File path: cpp/src/arrow/compute/exec/expression.cc ########## @@ -294,19 +293,21 @@ size_t Expression::hash() const { } auto call = CallNotNull(*this); - if (call->hash != nullptr) { - return call->hash->load(); + const auto cached_hash = call->hash.load(); Review comment: Sure, we can if the cost is not annoying. -- 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