Skip to content
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

Customize window frame support for dialect #70

Merged
merged 7 commits into from
Dec 31, 2024

Conversation

Sevenannn
Copy link

@Sevenannn Sevenannn commented Dec 27, 2024

Which issue does this PR close?

Rationale for this change

Some dialect doesn't support window frames in window function, for example, in dremio, window frame doesn't work with RANK, DENSE_RANK or ROW_NUMBER functions, and would cause error like will cause error like ROW/RANGE not allowed with RANK, DENSE_RANK or ROW_NUMBER functions.

What changes are included in this PR?

Include a method for Dialect determining whether the Dialect support window frame based on the window function name, start_bound, end_bound. When the window frame start_bound and end_bound indicates that no frame is specified in the original query, and the window function requires no window frame to function in the expected way, the window function will be unparsed as None in ast.

Are these changes tested?

Yes

Are there any user-facing changes?

No

@Sevenannn Sevenannn requested a review from a team December 27, 2024 22:26
@Sevenannn Sevenannn merged commit 4e1290a into spiceai-43 Dec 31, 2024
@Sevenannn Sevenannn deleted the qianqian/dialect-windowframe-support branch December 31, 2024 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants