diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-08 04:14:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-08 04:14:30 +0000 |
commit | 99980f928b5b7be237d108266072e51aa3bb354e (patch) | |
tree | ce6fff00ea2b834bdbe3d84dcac90df1617d4245 /tests/fixtures/identity.sql | |
parent | Adding upstream version 10.6.0. (diff) | |
download | sqlglot-99980f928b5b7be237d108266072e51aa3bb354e.tar.xz sqlglot-99980f928b5b7be237d108266072e51aa3bb354e.zip |
Adding upstream version 10.6.3.upstream/10.6.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/fixtures/identity.sql')
-rw-r--r-- | tests/fixtures/identity.sql | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/fixtures/identity.sql b/tests/fixtures/identity.sql index f2830b1..5a4871d 100644 --- a/tests/fixtures/identity.sql +++ b/tests/fixtures/identity.sql @@ -161,6 +161,7 @@ SELECT 1 FROM test SELECT * FROM a, b, (SELECT 1) AS c SELECT a FROM test SELECT 1 AS filter +SELECT 1 AS "quoted alias" SELECT SUM(x) AS filter SELECT 1 AS range FROM test SELECT 1 AS count FROM test @@ -264,7 +265,9 @@ SELECT a FROM test GROUP BY GROUPING SETS (x, ()) SELECT a FROM test GROUP BY GROUPING SETS (x, (x, y), (x, y, z), q) SELECT a FROM test GROUP BY CUBE (x) SELECT a FROM test GROUP BY ROLLUP (x) -SELECT a FROM test GROUP BY CUBE (x) ROLLUP (x, y, z) +SELECT t.a FROM test AS t GROUP BY ROLLUP (t.x) +SELECT a FROM test GROUP BY GROUPING SETS ((x, y)), ROLLUP (b) +SELECT a FROM test GROUP BY CUBE (x), ROLLUP (x, y, z) SELECT CASE WHEN a < b THEN 1 WHEN a < c THEN 2 ELSE 3 END FROM test SELECT CASE 1 WHEN 1 THEN 1 ELSE 2 END SELECT CASE 1 WHEN 1 THEN MAP('a', 'b') ELSE MAP('b', 'c') END['a'] @@ -339,7 +342,6 @@ SELECT CAST(a AS ARRAY<INT>) FROM test SELECT CAST(a AS VARIANT) FROM test SELECT TRY_CAST(a AS INT) FROM test SELECT COALESCE(a, b, c) FROM test -SELECT IFNULL(a, b) FROM test SELECT ANY_VALUE(a) FROM test SELECT 1 FROM a JOIN b ON a.x = b.x SELECT 1 FROM a JOIN b AS c ON a.x = b.x @@ -510,6 +512,14 @@ CREATE TABLE z (a INT UNIQUE AUTO_INCREMENT) CREATE TABLE z (a INT REFERENCES parent(b, c)) CREATE TABLE z (a INT PRIMARY KEY, b INT REFERENCES foo(id)) CREATE TABLE z (a INT, FOREIGN KEY (a) REFERENCES parent(b, c)) +CREATE TABLE foo (bar INT REFERENCES baz(baz_id) ON DELETE NO ACTION) +CREATE TABLE foo (bar INT REFERENCES baz(baz_id) ON DELETE CASCADE) +CREATE TABLE foo (bar INT REFERENCES baz(baz_id) ON DELETE SET NULL) +CREATE TABLE foo (bar INT REFERENCES baz(baz_id) ON DELETE SET DEFAULT) +CREATE TABLE foo (bar INT REFERENCES baz(baz_id) ON UPDATE NO ACTION) +CREATE TABLE foo (bar INT REFERENCES baz(baz_id) ON UPDATE CASCADE) +CREATE TABLE foo (bar INT REFERENCES baz(baz_id) ON UPDATE SET NULL) +CREATE TABLE foo (bar INT REFERENCES baz(baz_id) ON UPDATE SET DEFAULT) CREATE TABLE asd AS SELECT asd FROM asd WITH NO DATA CREATE TABLE asd AS SELECT asd FROM asd WITH DATA CREATE TABLE products (x INT GENERATED BY DEFAULT AS IDENTITY) @@ -526,6 +536,7 @@ CREATE TABLE a, DUAL JOURNAL, DUAL AFTER JOURNAL, MERGEBLOCKRATIO=1 PERCENT, DAT CREATE TABLE a, DUAL BEFORE JOURNAL, LOCAL AFTER JOURNAL, MAXIMUM DATABLOCKSIZE, BLOCKCOMPRESSION=AUTOTEMP(c1 INT) (a INT) CREATE SET GLOBAL TEMPORARY TABLE a, NO BEFORE JOURNAL, NO AFTER JOURNAL, MINIMUM DATABLOCKSIZE, BLOCKCOMPRESSION=NEVER (a INT) CREATE MULTISET VOLATILE TABLE a, NOT LOCAL AFTER JOURNAL, FREESPACE=1 PERCENT, DATABLOCKSIZE=10 BYTES, WITH NO CONCURRENT ISOLATED LOADING FOR ALL (a INT) +CREATE ALGORITHM=UNDEFINED DEFINER=foo@% SQL SECURITY DEFINER VIEW a AS (SELECT a FROM b) CREATE TEMPORARY TABLE x AS SELECT a FROM d CREATE TEMPORARY TABLE IF NOT EXISTS x AS SELECT a FROM d CREATE VIEW x AS SELECT a FROM b @@ -555,6 +566,7 @@ CREATE UNIQUE INDEX IF NOT EXISTS my_idx ON tbl (a, b) CREATE SCHEMA x CREATE SCHEMA IF NOT EXISTS y CREATE PROCEDURE IF NOT EXISTS a.b.c() AS 'DECLARE BEGIN; END' +CREATE OR REPLACE STAGE DESCRIBE x DROP INDEX a.b.c DROP FUNCTION a.b.c (INT) |