mustafasrepo opened a new issue, #3571:
URL: https://github.com/apache/arrow-datafusion/issues/3571

   # Hardcoded u64 for WindowFrameBound fields
   
   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   
   `WindowFrameBound` enum takes `Option<u64>` for `Preceding` and `Following` 
fields. When we run the below query in datafusion (valid in POSTGRESQL).
   
   ```sql
   SELECT 
        COUNT(*) OVER(ORDER BY ts RANGE BETWEEN '1 DAY' PRECEDING AND '1 DAY' 
FOLLOWING) as cnt 
   FROM t
   ```
   
   it produces error below.
   
   ```rust
   Error: SQL(ParserError("Expected literal int, found: '1 DAY'"))
   ```
   
   **Describe the solution you'd like**
   
   Instead of `Option<u64>`, we can use `Option<ScalarValue>` to support 
different types such as timestamps.
   
   **Describe alternatives you've considered**
   
   N.A
   
   **Additional context**
   
   The relevant code section can be found at the following link.
   
   [arrow-datafusion/window_frame.rs at 
c3bf84e334d6a12c89bacec38e2baa02ca2417ac ยท 
apache/arrow-datafusion](https://github.com/apache/arrow-datafusion/blob/c3bf84e334d6a12c89bacec38e2baa02ca2417ac/datafusion/expr/src/window_frame.rs#L131)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to