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
TMP: Disable failing tests due to windowed count(*) returning NULL
A change marking count(c) as non-null uncovered a bug that count(c) is
sometimes null today, in certain windowed queries. The bug has already
been fixed in DataFusion (PR 11989). Retracting the non-nullness marking
would have downstream issues on compilation. Cherry picking the fix
isn't feasible, without pulling many other changes the fix depends on.
let ctx = SessionContext::new_with_config(session_config);
56
+
57
+
let result = ctx.sql("SELECT x, count(x) OVER (ORDER BY x NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING) AS c FROM (VALUES (1), (2), (NULL), (3)) t(x)").await?.collect().await;
58
+
assert!(result.is_err());
59
+
// When this fails, drop the commit that introduce this test. This will unignore temporarily disabled tests.
60
+
result
61
+
.err()
62
+
.unwrap()
63
+
.message()
64
+
.contains("is declared as non-nullable but contains null values");
Copy file name to clipboardExpand all lines: datafusion/sqllogictest/test_files/window.slt
+1-7Lines changed: 1 addition & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -833,19 +833,13 @@ LIMIT 5
833
833
834
834
835
835
#fn window_frame_ranges_preceding_and_preceding
836
-
query II
836
+
query error DataFusion error: Arrow error: Invalid argument error: Column 'count\(\*\) ORDER BY \[aggregate_test_100\.c2 ASC NULLS LAST\] RANGE BETWEEN 3 PRECEDING AND 1 PRECEDING' is declared as non\-nullable but contains null values
837
837
SELECT
838
838
SUM(c2) OVER (ORDER BY c2 RANGE BETWEEN 3 PRECEDING AND 1 PRECEDING),
839
839
COUNT(*) OVER (ORDER BY c2 RANGE BETWEEN 3 PRECEDING AND 1 PRECEDING)
0 commit comments