minor(test): cover partially ordered aggregate spilling - #23947
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #23947 +/- ##
=======================================
Coverage 80.69% 80.70%
=======================================
Files 1095 1095
Lines 372626 372554 -72
Branches 372626 372554 -72
=======================================
- Hits 300700 300658 -42
+ Misses 53978 53926 -52
- Partials 17948 17970 +22 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
2010YOUY01
left a comment
There was a problem hiding this comment.
LGTM, thank you!
This suggestion is totally optional, it would be great to move it to sqllogictest, due to 1. the test can be stronger as it exercises the behavior end-to-end 2. easier to maintain (I found rust tests regularly need updates during refactors, and they're harder to review)
To do that, sqllogictest provides Rust hooks to setup tables with orders, and we can use explain/explain analyzes to assert if the ordered path is triggered, and if spill happens.
## Which issue does this PR close? - Part of apache#13431 ## Rationale for this change Contuining the work after apache#23947. Now `SortMergeJoinExec` supports spilling under memory pressure, but existing tests do not consistently assert that spilling occurs. ## What changes are included in this PR? Adds spill fuzz coverage, constrained-memory stress tests for materializing joins, and process-isolated memory-limit validation. ## Are these changes tested? test only change and it can be tested via: ``` cargo test -p datafusion --test fuzz --features extended_tests spill cargo test -p datafusion --test core_integration --features extended_tests smj_ ``` ## Are there any user-facing changes? no test only change
## Which issue does this PR close? - Not closes but part of apache#13431 ## Rationale for this change `GroupedHashAggregateStream` supports spilling for partially sorted group input, but existing aggregate spill tests only cover unordered (`GroupOrdering::None`) input. The `GroupOrdering::Partial` + `OutOfMemoryMode::Spill` path, including spilling sorted intermediate state and merging it back, does not have direct coverage. ## What changes are included in this PR? added test coverage for the case above ## Are these changes tested? test only change and it can be tested via: ``` cargo test --test sqllogictests -- ordered_aggregate_spill ``` ## Are there any user-facing changes? no test only change
## Which issue does this PR close? - Part of apache#13431 ## Rationale for this change Contuining the work after apache#23947. Now `SortMergeJoinExec` supports spilling under memory pressure, but existing tests do not consistently assert that spilling occurs. ## What changes are included in this PR? Adds spill fuzz coverage, constrained-memory stress tests for materializing joins, and process-isolated memory-limit validation. ## Are these changes tested? test only change and it can be tested via: ``` cargo test -p datafusion --test fuzz --features extended_tests spill cargo test -p datafusion --test core_integration --features extended_tests smj_ ``` ## Are there any user-facing changes? no test only change
Which issue does this PR close?
Rationale for this change
GroupedHashAggregateStreamsupports spilling for partially sorted group input, but existing aggregate spill tests only cover unordered (GroupOrdering::None) input. TheGroupOrdering::Partial+OutOfMemoryMode::Spillpath, including spilling sorted intermediate state and merging it back, does not have direct coverage.What changes are included in this PR?
added test coverage for the case above
Are these changes tested?
test only change and it can be tested via:
Are there any user-facing changes?
no test only change