Add new functional tests for UNION ALL. [#METR-14099]

This commit is contained in:
Alexey Arno 2014-12-16 19:44:05 +03:00
parent ce6e6248f2
commit fced798a98
13 changed files with 714 additions and 625 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,2 @@
1
2

View File

@ -0,0 +1 @@
SELECT 1 UNION ALL SELECT 2;

View File

@ -0,0 +1,2 @@
1
2

View File

@ -0,0 +1 @@
SELECT 1 UNION ALL SELECT 2;

View File

@ -0,0 +1,2 @@
1
2

View File

@ -0,0 +1,2 @@
SELECT 1 UNION /*comment*/ ALL SELECT 2;

View File

@ -0,0 +1,3 @@
1 2
3 4
5 6

View File

@ -0,0 +1 @@
SELECT 1,2 UNION ALL SELECT 3,4 UNION ALL SELECT 5,6;

View File

@ -0,0 +1,6 @@
Alice 1000
Alice 2000
Bob 2000
Bob 2000
Carol 5000
Dennis 35000

View File

@ -0,0 +1,15 @@
DROP TABLE IF EXISTS data2013;
DROP TABLE IF EXISTS data2014;
CREATE TABLE data2013 (name String, value UInt32) ENGINE = Memory;
CREATE TABLE data2014 (name String, value UInt32) ENGINE = Memory;
INSERT INTO data2013(name,value) VALUES('Alice', 1000);
INSERT INTO data2013(name,value) VALUES('Bob', 2000);
INSERT INTO data2013(name,value) VALUES('Carol', 5000);
INSERT INTO data2014(name,value) VALUES('Alice', 2000);
INSERT INTO data2014(name,value) VALUES('Bob', 2000);
INSERT INTO data2014(name,value) VALUES('Dennis', 35000);
SELECT nn,vv FROM (SELECT name AS nn, value AS vv FROM data2013 UNION ALL SELECT name AS nn, value AS vv FROM data2014) ORDER BY nn ASC;

View File

@ -0,0 +1,3 @@
1
2
3

View File

@ -0,0 +1,2 @@
SELECT X FROM (SELECT 3 AS X UNION ALL SELECT 2 AS X UNION ALL SELECT 1 AS X) ORDER BY X ASC;