You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "zhuqi-lucas (via GitHub)" <gi...@apache.org> on 2026/10/20 08:15:18 UTC
[PR] Resolve named windows in HAVING [datafusion]
zhuqi-lucas opened a new pull request, #26515:
URL: https://github.com/apache/datafusion/pull/26515
## Which issue does this PR close?
- Closes #26506.
## Rationale for this change
A named window in `HAVING` was never resolved, so `MAX(price) OVER w` was planned as a plain aggregate and the query returned rows instead of being rejected. An undefined window name in `HAVING` was not reported either.
## What changes are included in this PR?
Resolve named windows in `HAVING` together with the other clauses. The query now fails like the inline form (`Window function calls are not allowed in HAVING`), and an undefined name reports `The window ... is not defined!`.
This builds on #26400, which makes the resolver usable for any clause. Only the last commit is new; the diff shrinks to it once #26400 merges.
## Are these changes tested?
Yes, `window.slt` cases for `HAVING` (inline, named, undefined name) and `WHERE` (inline, named). The `HAVING` cases fail without the fix.
## Are there any user-facing changes?
Queries that used a named window in `HAVING` now return an error instead of wrong results.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Resolve named windows in HAVING [datafusion]
Posted by "zhuqi-lucas (via GitHub)" <gi...@apache.org>.
zhuqi-lucas merged PR #26515:
URL: https://github.com/apache/datafusion/pull/26515
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Resolve named windows in HAVING [datafusion]
Posted by "zhuqi-lucas (via GitHub)" <gi...@apache.org>.
zhuqi-lucas commented on PR #26515:
URL: https://github.com/apache/datafusion/pull/26515#issuecomment-6309800664
> Thanks @zhuqi-lucas
>
> This feels like it has non trivial overlap with #26400 🤔
Thanks @alamb for review, yes, merged now!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Resolve named windows in HAVING [datafusion]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #26515:
URL: https://github.com/apache/datafusion/pull/26515#issuecomment-6295302319
## [Codecov](https://app.codecov.io/gh/apache/datafusion/pull/26515?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `95.23810%` with `4 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 82.93%. Comparing base ([`d89a85d`](https://app.codecov.io/gh/apache/datafusion/commit/d89a85d3e340062a9efad3d8c4b32f10a7b139c5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`d7d2dae`](https://app.codecov.io/gh/apache/datafusion/commit/d7d2dae686c434ddad6dd68b4733808d84f49d6a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 2 commits behind head on main.
| [Files with missing lines](https://app.codecov.io/gh/apache/datafusion/pull/26515?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [datafusion/sql/src/select.rs](https://app.codecov.io/gh/apache/datafusion/pull/26515?src=pr&el=tree&filepath=datafusion%2Fsql%2Fsrc%2Fselect.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZGF0YWZ1c2lvbi9zcWwvc3JjL3NlbGVjdC5ycw==) | 95.23% | [2 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/datafusion/pull/26515?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #26515 +/- ##
==========================================
- Coverage 82.93% 82.93% -0.01%
==========================================
Files 1154 1154
Lines 457933 457984 +51
Branches 457933 457984 +51
==========================================
+ Hits 379786 379824 +38
- Misses 55128 55132 +4
- Partials 23019 23028 +9
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/datafusion/pull/26515?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org