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


##########
cpp/src/arrow/compute/row/compare_internal.h:
##########
@@ -32,6 +32,13 @@ namespace compute {
 
 class ARROW_EXPORT KeyCompare {
  public:
+  // Clarify the max temp stack usage for CompareColumnsToRows so the caller 
could reserve
+  // enough size in advance.
+  constexpr static int64_t CompareColumnsToRowsTempStackUsage(int64_t 
num_rows) {
+    return (sizeof(uint8_t) + sizeof(uint8_t) + sizeof(uint8_t)) * num_rows +

Review Comment:
   More comments added.



##########
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:
   More comments added.



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

Reply via email to