3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
10 #***********************************************************************
13 set testdir [file dirname $argv0]
14 source $testdir/tester.tcl
15 set testprefix windowD
19 CREATE TABLE t0(c0 TEXT);
20 CREATE VIEW v0(c0, c1)
21 AS SELECT CUME_DIST() OVER (PARTITION BY t0.c0), TRUE FROM t0;
22 INSERT INTO t0 VALUES ('x');
26 SELECT ('500') IS (v0.c1) FROM v0;
32 SELECT (('500') IS (v0.c1)) FROM v0, t0;
38 SELECT (('500') IS (v0.c1)) IS FALSE FROM v0;
50 SELECT * FROM v0 WHERE ('500' IS v0.c1) IS FALSE;
55 #-------------------------------------------------------------------------
60 INSERT INTO t1 VALUES('value');
61 CREATE VIEW v1(a, b, c, d) AS SELECT 1, 2, TRUE, FALSE FROM t1;
65 SELECT 500 IS a, 500 IS b, 500 IS c, 500 IS d FROM v1
69 SELECT * FROM v1 WHERE 500 IS c;
73 SELECT * FROM v1 WHERE 500 IS d;
77 CREATE VIEW v2 AS SELECT max(x) OVER () AS a, TRUE AS c FROM t1;
81 SELECT 500 IS c FROM v2;
85 SELECT * FROM v2 WHERE 500 IS c;