Skip to content

Minor: compute qualify window expressions only when QUALIFY clause is present#21173

Merged
jonahgao merged 2 commits intoapache:mainfrom
buraksenn:move-qualify-part-inside-qualify-if-block
Mar 27, 2026
Merged

Minor: compute qualify window expressions only when QUALIFY clause is present#21173
jonahgao merged 2 commits intoapache:mainfrom
buraksenn:move-qualify-part-inside-qualify-if-block

Conversation

@buraksenn
Copy link
Contributor

Which issue does this PR close?

Does not close but related #608

Rationale for this change

Followup to #20963
@jonahgao had a feedback in #20963 (comment) to try to find qualify only if we are inside QUALIFY block. I did not think it was this minor so thought followup would be better but this is simply moving to if block to prevent unnecessary computation

What changes are included in this PR?

Move qualify_window_func_exprs computation inside the QUALIFY block

Are these changes tested?

Covered by existing tests from #20963.

Are there any user-facing changes?

No

@github-actions github-actions bot added the sql SQL Planner label Mar 26, 2026
Copy link
Member

@jonahgao jonahgao left a comment

Choose a reason for hiding this comment

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

Thank you @buraksenn

@jonahgao jonahgao added this pull request to the merge queue Mar 27, 2026
Merged via the queue into apache:main with commit 1e3b956 Mar 27, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sql SQL Planner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants