neilconway opened a new issue, #23872:
URL: https://github.com/apache/datafusion/issues/23872
### Describe the bug
`SlidingMinAccumulator` reports a stale minimum when every non-`NULL` value
has been retracted from the window but the frame is still non-empty (i.e., the
frame contains only `NULL`s). Sliding max is correct.
### To Reproduce
```
SELECT id, x,
MIN(x) OVER (ORDER BY id ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) AS
min_x
FROM (VALUES (1, 3), (2, NULL), (3, NULL)) t(id, x)
ORDER BY id;
```
==>
```
+----+------+-------+
| id | x | min_x |
+----+------+-------+
| 1 | 3 | 3 |
| 2 | NULL | 3 |
| 3 | NULL | 3 |
+----+------+-------+
```
### Expected behavior
```
+----+------+-------+
| id | x | min_x |
+----+------+-------+
| 1 | 3 | 3 |
| 2 | NULL | 3 |
| 3 | NULL | NULL |
+----+------+-------+
```
### 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]