Throw an error if the second argument passed to nth_value() is not a positive

integer.

FossilOrigin-Name: 1a06e57a0b4279fa580c7ff4f152645f005794aaf86eeabf694637b7da11f763
This commit is contained in:
dan
2018-07-09 13:31:18 +00:00
parent f5e8e31399
commit a1a7e112fe
6 changed files with 68 additions and 20 deletions
+8
View File
@@ -1261,4 +1261,12 @@ do_execsql_test 10.1 {
SELECT id, min(b) OVER (PARTITION BY a ORDER BY id) FROM t7;
} {1 2 2 2 3 2 4 {} 5 8 6 1}
do_execsql_test 10.2 {
SELECT id, lead(b, -1) OVER (PARTITION BY a ORDER BY id) FROM t7;
} {1 {} 2 2 3 {} 4 {} 5 {} 6 8}
do_execsql_test 10.3 {
SELECT id, lag(b, -1) OVER (PARTITION BY a ORDER BY id) FROM t7;
} {1 {} 2 4 3 {} 4 8 5 1 6 {}}
finish_test