zanmato1984 commented on code in PR #41335:
URL: https://github.com/apache/arrow/pull/41335#discussion_r1598768932
##########
cpp/src/arrow/compute/key_hash_internal.h:
##########
@@ -161,6 +167,12 @@ class ARROW_EXPORT Hashing64 {
static void HashMultiColumn(const std::vector<KeyColumnArray>& cols,
LightContext* ctx,
uint64_t* hashes);
+ // Clarify the max temp stack usage for HashBatch so the caller could
reserve enough
+ // size in advance.
+ static constexpr auto kHashBatchTempStackUsage =
+ (sizeof(uint16_t) + sizeof(uint64_t) + /*extra=*/1) *
Review Comment:
This is something else I should've made the comment more verbose. Each
`sizeof` operator corresponds to a specific stack usage (a `TempVectorHolder`
in the implementation):
https://github.com/apache/arrow/blob/a715ea06b71ec206a987d7921264778e9954404b/cpp/src/arrow/compute/key_hash_internal.cc#L830-L835
The previous three-`sizeof` corresponds here:
https://github.com/apache/arrow/blob/a715ea06b71ec206a987d7921264778e9954404b/cpp/src/arrow/compute/key_hash_internal.cc#L387-L395
I'll update the comment later.
--
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]