mirror of
https://github.com/sqlite/sqlite.git
synced 2026-01-06 08:01:16 +03:00
Add further tests for new window function functionality.
FossilOrigin-Name: 1fbddf01b1c3fff95b05e2f2f709754e2b514296060b4846518791e7161d9ddb
This commit is contained in:
31215
test/window3.test
31215
test/window3.test
File diff suppressed because one or more lines are too long
@@ -38,6 +38,8 @@ foreach {tn frame} {
|
||||
6 "ORDER BY a GROUPS BETWEEN 1 PRECEDING AND -1 FOLLOWING"
|
||||
|
||||
7 "ORDER BY a,b RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING"
|
||||
|
||||
8 "PARTITION BY a RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING"
|
||||
} {
|
||||
errorsql_test 1.$tn "
|
||||
SELECT a, sum(b) OVER (
|
||||
|
||||
@@ -79,4 +79,11 @@ do_test 1.7 { catch { execsql {
|
||||
) FROM t1 ORDER BY 1
|
||||
} } } 1
|
||||
|
||||
# PG says ERROR: RANGE with offset PRECEDING/FOLLOWING requires exactly one ORDER BY column
|
||||
do_test 1.8 { catch { execsql {
|
||||
SELECT a, sum(b) OVER (
|
||||
PARTITION BY a RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING
|
||||
) FROM t1 ORDER BY 1
|
||||
} } } 1
|
||||
|
||||
finish_test
|
||||
|
||||
Reference in New Issue
Block a user