You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
LIMIT5
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.
The text was updated successfully, but these errors were encountered:
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
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 asOVER(ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
.OVER(ORDER BY c9, c1 RANGE UNBOUNDED PRECEDING)
is treated asOVER(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.
The text was updated successfully, but these errors were encountered: