aboutsummaryrefslogblamecommitdiff
path: root/sql/core/src/test/resources/sql-tests/results/union.sql.out
blob: c57028cabe933b1d9d75bcb8eb4352d5087e03d1 (plain) (tree)















































































                                                                            
-- Automatically generated by SQLQueryTestSuite
-- Number of queries: 7


-- !query 0
CREATE OR REPLACE TEMPORARY VIEW t1 AS VALUES (1, 'a'), (2, 'b') tbl(c1, c2)
-- !query 0 schema
struct<>
-- !query 0 output



-- !query 1
CREATE OR REPLACE TEMPORARY VIEW t2 AS VALUES (1.0, 1), (2.0, 4) tbl(c1, c2)
-- !query 1 schema
struct<>
-- !query 1 output



-- !query 2
SELECT *
FROM   (SELECT * FROM t1
        UNION ALL
        SELECT * FROM t1)
-- !query 2 schema
struct<c1:int,c2:string>
-- !query 2 output
1	a
1	a
2	b
2	b


-- !query 3
SELECT *
FROM   (SELECT * FROM t1
        UNION ALL
        SELECT * FROM t2
        UNION ALL
        SELECT * FROM t2)
-- !query 3 schema
struct<c1:decimal(11,1),c2:string>
-- !query 3 output
1	1
1	1
1	a
2	4
2	4
2	b


-- !query 4
SELECT a
FROM (SELECT 0 a, 0 b
      UNION ALL
      SELECT SUM(1) a, CAST(0 AS BIGINT) b
      UNION ALL SELECT 0 a, 0 b) T
-- !query 4 schema
struct<a:bigint>
-- !query 4 output
0
0
1


-- !query 5
DROP VIEW IF EXISTS t1
-- !query 5 schema
struct<>
-- !query 5 output



-- !query 6
DROP VIEW IF EXISTS t2
-- !query 6 schema
struct<>
-- !query 6 output