Uh oh!
There was an error while loading. Please reload this page.
Named window support - #6419
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
alamb
commented
May 23, 2023
I recommend we wait for #6416 to merge, but we can review this PR earlier. |
alamb
commented
May 23, 2023
#6416 is merged |
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
# Conflicts: # datafusion/sql/src/expr/function.rs # datafusion/sql/src/expr/mod.rs # datafusion/sql/src/select.rs # datafusion/sql/src/statement.rs
alamb
commented
May 23, 2023
I plan to review this tomorrow |
alamb
left a comment
There was a problem hiding this comment.
Thanks @berkaysynnada and @mustafasrepo -- I think this looks great!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Which issue does this PR close?
Closes#6125.
Rationale for this change
With 0.34 release of sql-parser, statements can differentiate the named windows. We can now support such queries:
What changes are included in this PR?
After the query parse, WindowType of the function can be in the form of WindowSpec or NamedWindow. In
select_to_plan()function, if there exist some NamedWindow's, there are reshaped as WindowSpec's by using the definition of the windows. If there are any undefined windows, an error is generated.sqlparser dependency is also updated to 0.34 with this PR.
Are these changes tested?
Yes, slt tests are added for both working and erroneous conditions.
Are there any user-facing changes?