-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opt: fix in-place modification of window definition in optbuilder
The optbuilder code which handles window functions inadvertently modifies the `WindowDef` in place. This leads to loss of qualification in the PARTITION BY and ORDER BY columns (which get replaced with `*scopeColumn`s). This is a problem for views where the query stored in the descriptor could be invalid without the qualification. This change fixes this by making copies as necessary. Fixes #47704. Release note (bug fix): fixed case where PARTITION BY and ORDER BY columns in window specifications were losing qualifications when used inside views.
- Loading branch information
1 parent
d4fb6b1
commit 5f3d080
Showing
3 changed files
with
47 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters