1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Fix a problem with the handling of NULL values in the min() window function.

FossilOrigin-Name: b76f35b09235d44dc3d176377bbb9c18b7cdc9392800103ff53c54730a427a5c
This commit is contained in:
dan
2018-07-07 17:30:44 +00:00
parent e4984a2bf4
commit d4fc49f735
5 changed files with 37 additions and 10 deletions

View File

@ -1249,4 +1249,16 @@ do_test 9.7 {
set myres
} {1.00 1.00 1.00}
do_execsql_test 10.0 {
DROP TABLE IF EXISTS t7;
CREATE TABLE t7(id INTEGER PRIMARY KEY, a INTEGER, b INTEGER);
INSERT INTO t7(id, a, b) VALUES
(1, 1, 2), (2, 1, NULL), (3, 1, 4),
(4, 3, NULL), (5, 3, 8), (6, 3, 1);
} {}
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}
finish_test