From c4b884098810997e21c1d683a9e3ca4dba2b397f Mon Sep 17 00:00:00 2001 From: jcsherin Date: Thu, 17 Oct 2024 21:54:30 +0530 Subject: [PATCH] Adds more tests cases --- datafusion/sqllogictest/test_files/window.slt | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/datafusion/sqllogictest/test_files/window.slt b/datafusion/sqllogictest/test_files/window.slt index 9ecd6f8b445b..b3f2786d3dba 100644 --- a/datafusion/sqllogictest/test_files/window.slt +++ b/datafusion/sqllogictest/test_files/window.slt @@ -4971,6 +4971,26 @@ SELECT LAG(NULL, 1, false) OVER () FROM t1; ---- false +query B +SELECT LEAD(NULL, 0, true) OVER () FROM t1; +---- +NULL + +query B +SELECT LAG(NULL, 0, true) OVER () FROM t1; +---- +NULL + +query B +SELECT LEAD(NULL, 1, true) OVER () FROM t1; +---- +true + +query B +SELECT LAG(NULL, 1, true) OVER () FROM t1; +---- +true + statement ok insert into t1 values (2); @@ -4986,6 +5006,18 @@ SELECT LAG(NULL, 1, false) OVER () FROM t1; false NULL +query B +SELECT LEAD(NULL, 1, true) OVER () FROM t1; +---- +NULL +true + +query B +SELECT LAG(NULL, 1, true) OVER () FROM t1; +---- +true +NULL + statement ok DROP TABLE t1;