Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GroupedHashAggregateStream should register spillable consumer #8002

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion datafusion/physical-plan/src/aggregates/row_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,9 @@ impl GroupedHashAggregateStream {
.collect();

let name = format!("GroupedHashAggregateStream[{partition}]");
let reservation = MemoryConsumer::new(name).register(context.memory_pool());
let reservation = MemoryConsumer::new(name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we create TestMemoryPool which will panic if unspillable operator is registered ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, looks good.
Another idea to test is that to write a test aggregation job with small memory pool size that fails with the greedy pool but succeeds with the fair pool. Not sure if we can write such case...

.with_can_spill(true)
.register(context.memory_pool());

let group_ordering = agg
.aggregation_ordering
Expand Down