@@ -1767,7 +1767,7 @@ logical_plan
1767176701)Projection: count(*) AS global_count
1768176802)--Aggregate: groupBy=[[]], aggr=[[count(Int64(1)) AS count(*)]]
1769176903)----SubqueryAlias: a
1770- 04)------Projection:
1770+ 04)------Projection:
1771177105)--------Aggregate: groupBy=[[aggregate_test_100.c1]], aggr=[[]]
1772177206)----------Projection: aggregate_test_100.c1
1773177307)------------Filter: aggregate_test_100.c13 != Utf8("C2GT5KVyOPZpgKVl110TyZO0NcJ434")
@@ -4625,6 +4625,38 @@ NULL 1
46254625statement ok
46264626DROP TABLE t;
46274627
4628+
4629+ # Test for ignore nulls in nth_VALUE without null values
4630+ statement ok
4631+ CREATE TABLE t AS VALUES (3, 3), (4, 4), (5, 5), (6, 6);
4632+
4633+ query I
4634+ SELECT column1 FROM t ORDER BY column2;
4635+ ----
4636+ 3
4637+ 4
4638+ 5
4639+ 6
4640+
4641+ query I
4642+ SELECT nth_VALUE(column1, 1) OVER(ORDER BY column2) FROM t;
4643+ ----
4644+ 3
4645+ 3
4646+ 3
4647+ 3
4648+
4649+ query I
4650+ SELECT nth_VALUE(column1, 1) IGNORE NULLS OVER(ORDER BY column2) FROM t;
4651+ ----
4652+ 3
4653+ 3
4654+ 3
4655+ 3
4656+
4657+ statement ok
4658+ DROP TABLE t;
4659+
46284660# Test for ignore nulls with ORDER BY in nth_VALUE
46294661statement ok
46304662CREATE TABLE t AS VALUES (3, 3), (4, 4), (null::bigint, 1), (null::bigint, 2), (5, 5), (6, 6);
@@ -5055,7 +5087,7 @@ select b, row_number() over (order by a) from (select TRUE as a, 1 as b);
50555087
50565088# test window functions on boolean columns
50575089statement count 0
5058- create table t1 (id int, bool_col boolean) as values
5090+ create table t1 (id int, bool_col boolean) as values
50595091 (1, true),
50605092 (2, false),
50615093 (3, true),
@@ -5110,7 +5142,7 @@ select ntile(2) over (order by bool_col) from t1;
511051422
51115143
51125144query IIIRRI
5113- select
5145+ select
51145146 row_number() over (order by bool_col) as row_num,
51155147 rank() over (order by bool_col) as rank,
51165148 dense_rank() over (order by bool_col) as dense_rank,
0 commit comments