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

Support "date" and "timestamp" inside window frame RANGE Queries #631

Closed
mustafasrepo opened this issue Sep 28, 2022 · 0 comments · Fixed by #655
Closed

Support "date" and "timestamp" inside window frame RANGE Queries #631

mustafasrepo opened this issue Sep 28, 2022 · 0 comments · Fixed by #655

Comments

@mustafasrepo
Copy link
Contributor

mustafasrepo commented Sep 28, 2022

Support INTERVAL in window RANGE Queries

Currently, we do not support the queries taking date or timestamp for range inside window frames. Following query

SELECT 
COUNT(*) OVER (ORDER BY ts RANGE BETWEEN  '1 DAY' PRECEDING AND '1 DAY' FOLLOWING) 
FROM t;

produces the error below:

ParserError("Expected literal int, found: INTERVAL")

Relevant section in the code, where window frame bounds are parsed can be found here.

sqlparser-rs/parser.rs at 6afd194e947cfd800376f424ff7c300ee385cd9e · sqlparser-rs/sqlparser-rs

@mustafasrepo mustafasrepo changed the title Support INTERVAL in window RANGE Queries Support "date" and "timestamp" inside window frame RANGE Queries Sep 28, 2022
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 a pull request may close this issue.

1 participant