1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +03:00

Get group_concat() to handle varying separator lengths when windowing

FossilOrigin-Name: 98e0f2bf67cdee1da1edadeb54ff8564728b3f28fc821e46e8de201247c3fc87
This commit is contained in:
larrybr
2021-09-29 00:32:13 +00:00
parent 76ec55fddb
commit dde13e6f88
4 changed files with 108 additions and 37 deletions

View File

@ -9,6 +9,7 @@
#
#***********************************************************************
# Test cases for RANGE BETWEEN and especially with NULLS LAST
# and for varying separator handling by group_concat().
#
set testdir [file dirname $argv0]
@ -356,5 +357,12 @@ do_execsql_test 8.1 {
FROM t1;
} {111 660 938 979}
do_execsql_test 9.0 {
CREATE TABLE seps(x);
INSERT INTO seps(x) VALUES ('1'), ('22'), ('333'), ('4444');
SELECT group_concat('-', x)
OVER ( ORDER BY x ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING )
FROM seps;
} {-22- -22-333- -333-4444- -4444-}
finish_test