Skip to content

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

Closed

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

Activity

  1. changed the title [-]Support INTERVAL in window RANGE Queries[/-] [+]Support "date" and "timestamp" inside window frame RANGE Queries[/+] on Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions