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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
