comphead opened a new issue, #22138:
URL: https://github.com/apache/datafusion/issues/22138
### Describe the bug
```
> SELECT i,AVG(v) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED
FOLLOWING) FROM (VALUES(1,1),(2,2),(3,NULL),(4,NULL)) t(i,v);
+---+-----------------------------------------------------------------------------------------+
| i | avg(t.v) ORDER BY [t.i ASC NULLS LAST] ROWS BETWEEN CURRENT ROW AND
UNBOUNDED FOLLOWING |
+---+-----------------------------------------------------------------------------------------+
| 1 | 1.5
|
| 2 | 2.0
|
| 3 | NaN
|
| 4 | NaN
|
+---+-----------------------------------------------------------------------------------------+
```
Correct result
```
D SELECT i,AVG(v) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED
FOLLOWING) FROM (VALUES(1,1),(2,2),(3,NULL),(4,NULL)) t(i,v);
┌───────┬──────────────────────────────────────────────────────────────────────┐
│ i │ avg(v) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND UNBOUNDED
FOL… │
│ int32 │ double
│
├───────┼──────────────────────────────────────────────────────────────────────┤
│ 1 │
1.5 │
│ 2 │
2.0 │
│ 3 │
│
│ 4 │
│
└───────┴──────────────────────────────────────────────────────────────────────┘
```
### To Reproduce
_No response_
### Expected behavior
_No response_
### Additional context
_No response_
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]