summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavan Deolasee2017-06-30 05:53:47 +0000
committerPavan Deolasee2017-06-30 05:53:47 +0000
commit7ba736dd0344f3af6ee00f474648480efa96bf0d (patch)
tree4c71b2091b53f61e5a3eb400c432a0458cd97941
parent9775547ff572c9bf76a11a76372ba6a168762de9 (diff)
Accept some of the changes in expected output of the 'union' test case.
Some minor changes in indentation, query and an addition of a Remote Subplan node in the explain plan.
-rw-r--r--src/test/regress/expected/union.out21
-rw-r--r--src/test/regress/sql/union.sql4
2 files changed, 13 insertions, 12 deletions
diff --git a/src/test/regress/expected/union.out b/src/test/regress/expected/union.out
index 7e56416dc7..ac56c3db56 100644
--- a/src/test/regress/expected/union.out
+++ b/src/test/regress/expected/union.out
@@ -197,8 +197,8 @@ SELECT f1 AS five FROM FLOAT8_TBL
WHERE f1 BETWEEN -1e6 AND 1e6
UNION
SELECT f1 FROM INT4_TBL
- WHERE f1 BETWEEN 0 AND 1000000
- ORDER BY 1;
+ WHERE f1 BETWEEN 0 AND 1000000
+ORDER BY 1;
five
-----------------------
-1004.3
@@ -446,7 +446,7 @@ LINE 1: ... int8_tbl EXCEPT SELECT q2 FROM int8_tbl ORDER BY q2 LIMIT 1...
^
HINT: There is a column named "q2" in table "*SELECT* 2", but it cannot be referenced from this part of the query.
-- But this should work:
-SELECT q1 FROM int8_tbl EXCEPT (((SELECT q2 FROM int8_tbl ORDER BY q2 LIMIT 1))) ORDER BY q1;
+SELECT q1 FROM int8_tbl EXCEPT (((SELECT q2 FROM int8_tbl ORDER BY q2 LIMIT 1))) ORDER BY 1;
q1
------------------
123
@@ -764,13 +764,14 @@ select * from
union all
select *, 1 as x from int8_tbl b) ss
where (x = 0) or (q1 >= q2 and q1 <= q2);
- QUERY PLAN
----------------------------------------------
- Append
- -> Seq Scan on int8_tbl a
- -> Seq Scan on int8_tbl b
- Filter: ((q1 >= q2) AND (q1 <= q2))
-(4 rows)
+ QUERY PLAN
+---------------------------------------------------
+ Remote Subquery Scan on all (datanode_1)
+ -> Append
+ -> Seq Scan on int8_tbl a
+ -> Seq Scan on int8_tbl b
+ Filter: ((q1 >= q2) AND (q1 <= q2))
+(5 rows)
select * from
(select *, 0 as x from int8_tbl a
diff --git a/src/test/regress/sql/union.sql b/src/test/regress/sql/union.sql
index 5a253a4c65..f0f7640869 100644
--- a/src/test/regress/sql/union.sql
+++ b/src/test/regress/sql/union.sql
@@ -133,11 +133,11 @@ SELECT f1 FROM float8_tbl EXCEPT SELECT f1 FROM int4_tbl ORDER BY 1;
-- Operator precedence and (((((extra))))) parentheses
--
-SELECT q1 FROM int8_tbl INTERSECT SELECT q2 FROM int8_tbl UNION ALL SELECT q2 FROM int8_tbl ORDER BY 1;
+SELECT q1 FROM int8_tbl INTERSECT SELECT q2 FROM int8_tbl UNION ALL SELECT q2 FROM int8_tbl ORDER BY 1;
SELECT q1 FROM int8_tbl INTERSECT (((SELECT q2 FROM int8_tbl UNION ALL SELECT q2 FROM int8_tbl))) ORDER BY 1;
-(((SELECT q1 FROM int8_tbl INTERSECT SELECT q2 FROM int8_tbl ORDER BY 1))) UNION ALL SELECT q2 FROM int8_tbl;
+(((SELECT q1 FROM int8_tbl INTERSECT SELECT q2 FROM int8_tbl))) UNION ALL SELECT q2 FROM int8_tbl ORDER BY 1;
SELECT q1 FROM int8_tbl UNION ALL SELECT q2 FROM int8_tbl EXCEPT SELECT q1 FROM int8_tbl ORDER BY 1;