diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-10-04 09:37:06 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-10-04 09:37:06 +0000 |
commit | 83c68af3fef95831b1d7fce36c532825246937b4 (patch) | |
tree | c75f75c0fe40723995dfd08e42f031c8b7287d2e /tests/fixtures/optimizer/optimizer.sql | |
parent | Adding upstream version 6.2.6. (diff) | |
download | sqlglot-83c68af3fef95831b1d7fce36c532825246937b4.tar.xz sqlglot-83c68af3fef95831b1d7fce36c532825246937b4.zip |
Adding upstream version 6.2.8.upstream/6.2.8
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/fixtures/optimizer/optimizer.sql | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/fixtures/optimizer/optimizer.sql b/tests/fixtures/optimizer/optimizer.sql index 0bb742b..eb6761a 100644 --- a/tests/fixtures/optimizer/optimizer.sql +++ b/tests/fixtures/optimizer/optimizer.sql @@ -137,3 +137,20 @@ SELECT AGGREGATE(ARRAY(x.a, x.b), 0, (x, acc) -> x + acc + a) AS sum_agg FROM x; SELECT AGGREGATE(ARRAY("x"."a", "x"."b"), 0, ("x", "acc") -> "x" + "acc" + "x"."a") AS "sum_agg" FROM "x" AS "x"; + +SELECT cola, colb FROM (VALUES (1, 'test'), (2, 'test2')) AS tab(cola, colb); +SELECT + "tab"."cola" AS "cola", + "tab"."colb" AS "colb" +FROM (VALUES + (1, 'test'), + (2, 'test2')) AS "tab"("cola", "colb"); + +# dialect: spark +SELECT cola, colb FROM (VALUES (1, 'test'), (2, 'test2')) AS tab(cola, colb); +SELECT + `tab`.`cola` AS `cola`, + `tab`.`colb` AS `colb` +FROM VALUES + (1, 'test'), + (2, 'test2') AS `tab`(`cola`, `colb`); |