Named window support#6419
Merged
mustafasrepo merged 12 commits intoapache:mainfrom May 25, 2023
synnada-ai:feature/named-window
Merged
Named window support#6419mustafasrepo merged 12 commits intoapache:mainfrom synnada-ai:feature/named-window
mustafasrepo merged 12 commits intoapache:mainfrom
synnada-ai:feature/named-window
Conversation
Contributor
Author
Contributor
I recommend we wait for #6416 to merge, but we can review this PR earlier. |
Contributor
|
#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
Contributor
|
I plan to review this tomorrow |
mustafasrepo
approved these changes
May 24, 2023
alamb
approved these changes
May 24, 2023
Contributor
alamb
left a comment
There was a problem hiding this comment.
Thanks @berkaysynnada and @mustafasrepo -- I think this looks great!
alamb
reviewed
May 25, 2023
Contributor
alamb
left a comment
There was a problem hiding this comment.
Thanks again @berkaysynnada
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?