Accept upstream plan changes in the join regression suite
authorTomas Vondra <[email protected]>
Thu, 4 May 2017 16:18:43 +0000 (18:18 +0200)
committerTomas Vondra <[email protected]>
Thu, 4 May 2017 16:34:24 +0000 (18:34 +0200)
Two plans changed between REL9_5_STABLE and REL9_6_STABLE in the join
regression suite, so accept matching changes in XL (add Remote nodes).

src/test/regress/expected/join.out

index 8cd0cd7e241da73c9fbeb4206881d6cdf0106988..e8cfe45bf40597f30b0a1776f2fcd438be564156 100644 (file)
@@ -4260,18 +4260,15 @@ select d.* from d left join (select * from b group by b.id, b.c_id) s
                      QUERY PLAN                      
 -----------------------------------------------------
  Remote Subquery Scan on all (datanode_1,datanode_2)
-   ->  Merge Left Join
-         Merge Cond: (d.a = s.id)
+   ->  Merge Right Join
+         Merge Cond: (b.id = d.a)
+         ->  Group
+               Group Key: b.id
+               ->  Index Scan using b_pkey on b
          ->  Sort
                Sort Key: d.a
                ->  Seq Scan on d
-         ->  Sort
-               Sort Key: s.id
-               ->  Subquery Scan on s
-                     ->  HashAggregate
-                           Group Key: b.id, b.c_id
-                           ->  Seq Scan on b
-(12 rows)
+(9 rows)
 
 -- similarly, but keying off a DISTINCT clause
 explain (costs off)
@@ -4280,18 +4277,16 @@ select d.* from d left join (select distinct * from b) s
                      QUERY PLAN                      
 -----------------------------------------------------
  Remote Subquery Scan on all (datanode_1,datanode_2)
-   ->  Merge Left Join
-         Merge Cond: (d.a = s.id)
+   ->  Merge Right Join
+         Merge Cond: (b.id = d.a)
+         ->  Unique
+               ->  Sort
+                     Sort Key: b.id, b.c_id
+                     ->  Seq Scan on b
          ->  Sort
                Sort Key: d.a
                ->  Seq Scan on d
-         ->  Sort
-               Sort Key: s.id
-               ->  Subquery Scan on s
-                     ->  HashAggregate
-                           Group Key: b.id, b.c_id
-                           ->  Seq Scan on b
-(12 rows)
+(10 rows)
 
 -- check join removal works when uniqueness of the join condition is enforced
 -- by a UNION