Skip to content

minor(test): cover partially ordered aggregate spilling - #23947

Open
buraksenn wants to merge 2 commits into
apache:mainfrom
buraksenn:test-paritally-ordered-aggregate-spill
Open

minor(test): cover partially ordered aggregate spilling#23947
buraksenn wants to merge 2 commits into
apache:mainfrom
buraksenn:test-paritally-ordered-aggregate-spill

Conversation

@buraksenn

@buraksenn buraksenn commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

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

@github-actions github-actions Bot added the physical-plan Changes to the physical-plan crate label Jul 28, 2026
@codecov-commenter

codecov-commenter commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.70%. Comparing base (994fc81) to head (5f5470e).
⚠️ Report is 8 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@2010YOUY01 2010YOUY01 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@github-actions github-actions Bot added sqllogictest SQL Logic Tests (.slt) and removed physical-plan Changes to the physical-plan crate labels Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants