From aa785f3481be8cdf36f980058fedb3f2437fb005 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Fri, 24 Jul 2015 00:30:34 +0300 Subject: [PATCH] dbms: added tests [#METR-15418]. --- .../0_stateless/00203_full_join.reference | 40 +++++++++++++++++++ .../queries/0_stateless/00203_full_join.sql | 11 +++++ 2 files changed, 51 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/00203_full_join.reference create mode 100644 dbms/tests/queries/0_stateless/00203_full_join.sql diff --git a/dbms/tests/queries/0_stateless/00203_full_join.reference b/dbms/tests/queries/0_stateless/00203_full_join.reference new file mode 100644 index 00000000000..0b56ddea8cf --- /dev/null +++ b/dbms/tests/queries/0_stateless/00203_full_join.reference @@ -0,0 +1,40 @@ +1 Hello [] +2 Hello [] +3 Hello [0,1,2] +4 [0,1,2,3] +5 [0,1,2,3,4] +1 Hello +2 Hello +3 Hello +4 +5 +1 [] +2 [] +3 [0,1,2] +4 [0,1,2,3] +5 [0,1,2,3,4] +Hello [] +Hello [] +Hello [0,1,2] + [0,1,2,3] + [0,1,2,3,4] +1 +2 +3 +4 +5 +3 Hello [0,1,2] +4 [0,1,2,3] +5 [0,1,2,3,4] +3 Hello +4 +5 +3 [0,1,2] +4 [0,1,2,3] +5 [0,1,2,3,4] +Hello [0,1,2] + [0,1,2,3] + [0,1,2,3,4] +3 +4 +5 diff --git a/dbms/tests/queries/0_stateless/00203_full_join.sql b/dbms/tests/queries/0_stateless/00203_full_join.sql new file mode 100644 index 00000000000..8a262a821ab --- /dev/null +++ b/dbms/tests/queries/0_stateless/00203_full_join.sql @@ -0,0 +1,11 @@ +SELECT k, x, y FROM (SELECT arrayJoin([1, 2, 3]) AS k, 'Hello' AS x) ANY FULL JOIN (SELECT range(k) AS y, arrayJoin([3, 4, 5]) AS k) USING k WHERE k < 10 ORDER BY k; +SELECT k, x FROM (SELECT arrayJoin([1, 2, 3]) AS k, 'Hello' AS x) ANY FULL JOIN (SELECT range(k) AS y, arrayJoin([3, 4, 5]) AS k) USING k WHERE k < 10 ORDER BY k; +SELECT k, y FROM (SELECT arrayJoin([1, 2, 3]) AS k, 'Hello' AS x) ANY FULL JOIN (SELECT range(k) AS y, arrayJoin([3, 4, 5]) AS k) USING k WHERE k < 10 ORDER BY k; +SELECT x, y FROM (SELECT arrayJoin([1, 2, 3]) AS k, 'Hello' AS x) ANY FULL JOIN (SELECT range(k) AS y, arrayJoin([3, 4, 5]) AS k) USING k WHERE k < 10 ORDER BY k; +SELECT k FROM (SELECT arrayJoin([1, 2, 3]) AS k, 'Hello' AS x) ANY FULL JOIN (SELECT range(k) AS y, arrayJoin([3, 4, 5]) AS k) USING k WHERE k < 10 ORDER BY k; + +SELECT k, x, y FROM (SELECT arrayJoin([1, 2, 3]) AS k, 'Hello' AS x) ANY RIGHT JOIN (SELECT range(k) AS y, arrayJoin([3, 4, 5]) AS k) USING k WHERE k < 10 ORDER BY k; +SELECT k, x FROM (SELECT arrayJoin([1, 2, 3]) AS k, 'Hello' AS x) ANY RIGHT JOIN (SELECT range(k) AS y, arrayJoin([3, 4, 5]) AS k) USING k WHERE k < 10 ORDER BY k; +SELECT k, y FROM (SELECT arrayJoin([1, 2, 3]) AS k, 'Hello' AS x) ANY RIGHT JOIN (SELECT range(k) AS y, arrayJoin([3, 4, 5]) AS k) USING k WHERE k < 10 ORDER BY k; +SELECT x, y FROM (SELECT arrayJoin([1, 2, 3]) AS k, 'Hello' AS x) ANY RIGHT JOIN (SELECT range(k) AS y, arrayJoin([3, 4, 5]) AS k) USING k WHERE k < 10 ORDER BY k; +SELECT k FROM (SELECT arrayJoin([1, 2, 3]) AS k, 'Hello' AS x) ANY RIGHT JOIN (SELECT range(k) AS y, arrayJoin([3, 4, 5]) AS k) USING k WHERE k < 10 ORDER BY k;