Copilot commented on code in PR #12528:
URL: https://github.com/apache/gluten/pull/12528#discussion_r3592469631


##########
cpp/velox/jni/JniHashTable.cc:
##########
@@ -180,6 +180,11 @@ size_t 
serializedHashTableSize(std::shared_ptr<HashTableBuilder> builder) {
   return HashTableSerializer::serializedSize<true>(hashTableTrue);
 }
 
+int64_t hashTableMemoryUsage(std::shared_ptr<HashTableBuilder> builder) {
+  VELOX_CHECK_NOT_NULL(builder, "Hash table builder cannot be null");
+  return builder->hashTableMemoryUsage();
+}

Review Comment:
   `hashTableMemoryUsage()` currently just returns the cached value stored in 
`HashTableBuilder`. That value is only set in the native build path, so handles 
created via `deserializeHashTable(...)` (and any other paths that don't call 
`setHashTableMemoryUsage`) will report `0`, making the metric incorrect for 
driver-built / deserialized hash tables.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to