Skip to content

fix: Apply the OVER clause to multi-argument aggregates - #29160

Merged
ritchie46 merged 1 commit into
mainfrom
worktree-sql-window-partition-by
Sep 4, 2026
Merged

ritchie46 merged 1 commit into
mainfrom
worktree-sql-window-partition-by

Conversation

@ritchie46

@ritchie46 ritchie46 commented Sep 4, 2026 •

Copy link
Copy Markdown
Member

fixes #29150

@github-actions

github-actions Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

The uncompressed lib size after this PR is 54.7247 MB (at 435b2ed).

@github-actions github-actions Bot added A-sql Area: Polars SQL functionality fix Bug fix title needs formatting labels Sep 4, 2026
@ritchie46 ritchie46 changed the title fix(sql): Apply the OVER clause to multi-argument aggregates fix: Apply the OVER clause to multi-argument aggregates Sep 4, 2026
The `OVER` clause was only applied by `try_visit_unary` and a handful of
hand-written aggregate visitors, so multi-argument aggregates such as
`CORR`, `COVAR_POP`, `COVAR_SAMP` and `QUANTILE_CONT`/`QUANTILE_DISC`
silently dropped it and aggregated over the whole frame. `ARRAY_AGG`,
`STRING_AGG`, `ARRAY_INNER_PRODUCT` and UDFs had the same gap in their
own visitors.

Fixes #29150

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016q5BnG1jzUBLVdzSsPs5pR
@github-actions github-actions Bot added python Related to Python Polars rust Related to Rust Polars and removed title needs formatting labels Sep 4, 2026
@ritchie46
ritchie46 force-pushed the worktree-sql-window-partition-by branch from d55e73a to 435b2ed Compare September 4, 2026 15:51
@ritchie46
ritchie46 merged commit a05435d into main Sep 4, 2026
19 of 20 checks passed
@ritchie46
ritchie46 deleted the worktree-sql-window-partition-by branch September 4, 2026 15:52
@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.67%. Comparing base (fec681c) to head (435b2ed).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #29160      +/-   ##
==========================================
+ Coverage   81.65%   81.67%   +0.02%     
==========================================
  Files        1905     1905              
  Lines      270933   270975      +42     
  Branches     3105     3105              
==========================================
+ Hits       221242   221331      +89     
+ Misses      48906    48861      -45     
+ Partials      785      783       -2     

☔ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-sql Area: Polars SQL functionality fix Bug fix python Related to Python Polars rust Related to Rust Polars

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SQL: window aggregates ignore partition by

1 participant