Skip to content

Navigation Menu

Sign in
Sign up

Memory Used for GrouBy or Join #49469

Unanswered
hahn80 asked this question in Q&A
Mar 9, 2026 · 1 comments · 2 replies
Discussion options

In Apache Arrow Acero C++, group_by builds an internal aggregation map, while hash join builds an internal hash table.
How can we measure or track the memory usage specifically allocated for these two structures during execution?
Thank you!

You must be logged in to vote

Replies: 1 comment 2 replies

Comment options

It’s only supported in Arrow C++ today. You can pass a dedicated MemoryPool via ExecContext for the plan and query bytes_allocated() (and max_memory() for peak). This gives a plan‐level estimate because other operators also allocate from that pool. For hash‐table‐only memory, you’d need to route allocations for SwissJoin (and/or hash aggregate) to a separate pool, which currently requires finer‐grained plumbing or instrumentation.

You must be logged in to vote
2 replies
Comment options

Thank you very much for your inside. I will follow your idea to test it. I am working with CPP, so I probably track a bit deeper into what acero offers.

Comment options

Great. Let me know if you have any further questions! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /