Skip to content

Window Function With Parameter Parsed as Two Columns #184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
reata opened this issue Nov 13, 2021 · 1 comment · Fixed by #193
Closed

Window Function With Parameter Parsed as Two Columns #184

reata opened this issue Nov 13, 2021 · 1 comment · Fixed by #193
Assignees
Labels
bug Something isn't working

Comments

@reata
Copy link
Owner

reata commented Nov 13, 2021

Now row_number() OVER ... and rank() OVER ... are handled. But window function like max(col) OVER ..., sum(col1) OVER ... will get wrong result.

@reata reata added the bug Something isn't working label Nov 13, 2021
@reata
Copy link
Owner Author

reata commented Nov 27, 2021

"ROW_NUMBER() OVER (PARTITION BY col1, col2) rn" will be parsed as <Function 'row_number'> + <Keyword 'OVER'> + <Identifier '(PARTITION BY col1, col2)'>, which is not desirable. I'll try to see if I can extend or monkey patch sqlparse by grouping these together to a a new 'Window' tokenlist.

Reference:

@reata reata self-assigned this Dec 4, 2021
@reata reata closed this as completed in #193 Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant