mustafasrepo opened a new issue, #5275:
URL: https://github.com/apache/arrow-datafusion/issues/5275
**Is your feature request related to a problem or challenge? Please describe
what you are trying to do.**
When I run the query below in postgre
```sql
SELECT
c9,
COUNT(*) OVER(ORDER BY c9, c1 RANGE BETWEEN CURRENT ROW AND CURRENT ROW)
AS cnt1,
COUNT(*) OVER(ORDER BY c9, c1 RANGE UNBOUNDED PRECEDING) AS cnt2,
COUNT(*) OVER(ORDER BY c9, c1 RANGE CURRENT ROW) AS cnt3,
COUNT(*) OVER(RANGE BETWEEN CURRENT ROW AND CURRENT ROW) AS cnt4,
COUNT(*) OVER(RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS cnt5,
COUNT(*) OVER(RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) AS cnt6
FROM aggregate_test_100
ORDER BY c9
LIMIT 5
```
It produces valid result. Behaviour is as follows `(RANGE BETWEEN CURRENT
ROW AND CURRENT ROW)`, `OVER(RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT
ROW)`, `OVER(RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING)` are treated as
`OVER(ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)`. `OVER(ORDER
BY c9, c1 RANGE UNBOUNDED PRECEDING)` is treated as `OVER(ORDER BY c9, c1 RANGE
BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)`
When we run this query in datafusion it gives the error `With window frame
of type RANGE, the order by expression must be of length 1, got 2`.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
I would like to see same behaviour as postgre
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features
you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]