test: add regression coverage for terminal hash aggregate drain - #24853
Open
hhhizzz wants to merge 1 commit into
Open
test: add regression coverage for terminal hash aggregate drain#24853hhhizzz wants to merge 1 commit into
hhhizzz wants to merge 1 commit into
Conversation
hhhizzz
force-pushed
the
test/issue-24849-terminal-hash-aggregate-drain
branch
from
September 1, 2026 15:35
40b6be7 to
3a614fd
Compare
hhhizzz
marked this pull request as ready for review
September 1, 2026 16:14
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #24853 +/- ##
==========================================
+ Coverage 81.58% 81.59% +0.01%
==========================================
Files 1123 1123
Lines 408215 408970 +755
Branches 408215 408970 +755
==========================================
+ Hits 333034 333705 +671
- Misses 55613 55653 +40
- Partials 19568 19612 +44 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
#23182 fixed a performance regression in terminal hash aggregate output by avoiding repeated destructive
EmitTo::Firstcalls. However, the remainingMaterializedAggregateOutputunit test only exercises the slicing helper and does not verify the behavior throughAggregateExec.A result-only integration test would pass with both the regressed and fixed implementations, while a wall-clock assertion would be unreliable in CI. This PR therefore uses a test
GroupsAccumulatorthat returns an error if terminal output falls back to destructiveEmitTo::First.What changes are included in this PR?
single_grouped_aggregate_avoids_destructive_terminal_drain, which runs unordered Single hash aggregation with more groups than the configuredbatch_size.AggregateExecselectsSingleHash, emits multiple bounded batches, and returns the correct aggregate results for repeated group keys.MaterializedAggregateOutput; Single and Final hash aggregation exercise the same terminal drain helper.What is the testing strategy for this PR?
EmitTo::First(batch_size)causes the new test to fail with the expected accumulator error, while the current implementation passes.d58e0c6d4^and passes ond58e0c6d4. The migrated SingleHash stream did not exist at that historical revision.cargo fmt --all.cargo clippy --all-targets --all-features -- -D warnings.avro,json,backtrace,extended_tests,recursive_protection,parquet_encryption; all tests passed after initializing the required Arrow and Parquet test fixtures.Are there any user-facing changes?
No. This PR only adds regression test coverage.