Skip to content

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

@mustafasrepo

Description

@mustafasrepo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions