kumarUjjawal commented on code in PR #24025:
URL: https://github.com/apache/datafusion/pull/24025#discussion_r3690533045
##########
datafusion/sqllogictest/test_files/window.slt:
##########
@@ -6843,16 +6843,17 @@ DROP TABLE issue_20194_t1;
statement ok
DROP TABLE issue_20194_t2;
-# Sliding-window MIN/MAX over a frame whose non-NULL values have all been
-# retracted should yield NULL.
-query IIII
+# Sliding-window over a frame whose non-NULL values have all been retracted
should yield NULL.
+query IIIIRR
SELECT id, x,
MIN(x) OVER (ORDER BY id ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) AS
min_x,
- MAX(x) OVER (ORDER BY id ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) AS
max_x
+ MAX(x) OVER (ORDER BY id ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) AS
max_x,
Review Comment:
This ROWS BETWEEN 1 PRECEDING frame retracts one row at a time. The value 3
uses the non-null fast path, while the nullable path receives only [NULL], so
its iter().flatten() loop has no values to remove. A regression that ignores
non-null values whenever the input has nulls would still pass.
can we use a peer-group RANGE/GROUPS frame, or a direct accumulator test,
that retracts [NULL, value] together and asserts the final percentile and
median.
--
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]