Accept some of the changes in expected output of the 'union' test case.
authorPavan Deolasee <[email protected]>
Fri, 30 Jun 2017 05:53:47 +0000 (11:23 +0530)
committerPavan Deolasee <[email protected]>
Fri, 30 Jun 2017 05:53:47 +0000 (11:23 +0530)
Some minor changes in indentation, query and an addition of a Remote Subplan
node in the explain plan.

src/test/regress/expected/union.out
src/test/regress/sql/union.sql

index 7e56416dc76c7f57dc365581c94ed1dd05e534c3..ac56c3db564f223f556920e934dc989b21708453 100644 (file)
@@ -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
index 5a253a4c65a246b7bb22522b382ec1046c699abf..f0f76408696da13f0e6726d073619162eb0fc8cb 100644 (file)
@@ -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;