This is an automated email from the ASF dual-hosted git repository.

yjhjstz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit 4bd2d57baa90aec88c1da062b912e7c760271d2c
Author: Jianghua Yang <[email protected]>
AuthorDate: Tue Dec 31 15:30:37 2024 +0800

    Fix test cases of cherry-pick.
---
 src/test/regress/GNUmakefile                       |  2 +-
 src/test/regress/expected/rpt_optimizer.out        | 21 ++++----
 .../regress/expected/subselect_gp_optimizer.out    | 57 ++++++++++++----------
 3 files changed, 44 insertions(+), 36 deletions(-)

diff --git a/src/test/regress/GNUmakefile b/src/test/regress/GNUmakefile
index 43ef46519f..83d1dc76aa 100644
--- a/src/test/regress/GNUmakefile
+++ b/src/test/regress/GNUmakefile
@@ -211,7 +211,7 @@ installcheck-parallel: all
        $(pg_regress_installcheck) $(REGRESS_OPTS) 
--schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(EXTRA_TESTS)
 
 # cbdb parallel plan tests, ignore the incompatible cases, should run with 5 
GUCs like below:
-installcheck-cbdb-parallel: all twophase_pqexecparams
+installcheck-cbdb-parallel: all tablespace-setup twophase_pqexecparams
        ( \
        export PGOPTIONS='-c optimizer=off -c enable_parallel=true -c 
min_parallel_table_scan_size=0 -c min_parallel_index_scan_size=0 -c 
force_parallel_mode=1'; \
        $(pg_regress_installcheck) $(REGRESS_OPTS) 
--schedule=$(srcdir)/parallel_schedule --schedule=$(srcdir)/greenplum_schedule 
$(MAXCONNOPT) $(EXTRA_TESTS) --exclude-tests explain \
diff --git a/src/test/regress/expected/rpt_optimizer.out 
b/src/test/regress/expected/rpt_optimizer.out
index 5585b29b56..62a9fe489a 100644
--- a/src/test/regress/expected/rpt_optimizer.out
+++ b/src/test/regress/expected/rpt_optimizer.out
@@ -1092,17 +1092,20 @@ set optimizer_enable_hashjoin=off;
 set enable_hashjoin=off;
 set enable_nestloop=on;
 explain select b from dist_tab where b in (select distinct c from rep_tab);
-                                           QUERY PLAN                          
                 
-------------------------------------------------------------------------------------------------
- Gather Motion 3:1  (slice1; segments: 3)  
(cost=10000000001.15..10000000021.42 rows=4 width=4)
-   ->  Nested Loop  (cost=10000000001.15..10000000021.36 rows=1 width=4)
-         ->  HashAggregate  (cost=10000000001.02..10000000001.03 rows=2 
width=4)
+                                   QUERY PLAN                                  
  
+---------------------------------------------------------------------------------
+ Gather Motion 3:1  (slice1; segments: 3)  (cost=0.00..443.00 rows=4 width=4)
+   ->  Nested Loop  (cost=0.00..443.00 rows=2 width=4)
+         Join Filter: true
+         ->  GroupAggregate  (cost=0.00..431.00 rows=2 width=4)
                Group Key: rep_tab.c
-               ->  Seq Scan on rep_tab  (cost=10000000000.00..10000000001.02 
rows=2 width=4)
-         ->  Index Only Scan using idx on dist_tab  (cost=0.13..10.16 rows=1 
width=4)
+               ->  Sort  (cost=0.00..431.00 rows=2 width=4)
+                     Sort Key: rep_tab.c
+                     ->  Seq Scan on rep_tab  (cost=0.00..431.00 rows=2 
width=4)
+         ->  Index Scan using idx on dist_tab  (cost=0.00..12.00 rows=1 
width=4)
                Index Cond: (b = rep_tab.c)
- Optimizer: Postgres query optimizer
-(8 rows)
+ Optimizer: Pivotal Optimizer (GPORCA)
+(11 rows)
 
 select b from dist_tab where b in (select distinct c from rep_tab);
  b 
diff --git a/src/test/regress/expected/subselect_gp_optimizer.out 
b/src/test/regress/expected/subselect_gp_optimizer.out
index a8bca6365f..4c1a9bae45 100644
--- a/src/test/regress/expected/subselect_gp_optimizer.out
+++ b/src/test/regress/expected/subselect_gp_optimizer.out
@@ -1775,22 +1775,27 @@ EXPLAIN select count(distinct ss.ten) from
 EXPLAIN select count(*) from
   (select 1 from tenk1 a
    where unique1 IN (select distinct hundred from tenk1 b)) ss;
-                                                        QUERY PLAN             
                                            
----------------------------------------------------------------------------------------------------------------------------
- Finalize Aggregate  (cost=210.51..210.52 rows=1 width=8)
-   ->  Gather Motion 3:1  (slice1; segments: 3)  (cost=210.45..210.50 rows=3 
width=8)
-         ->  Partial Aggregate  (cost=210.45..210.46 rows=1 width=8)
-               ->  Hash Join  (cost=138.92..210.37 rows=33 width=0)
-                     Hash Cond: (a.unique1 = b.hundred)
-                     ->  Seq Scan on tenk1 a  (cost=0.00..62.33 rows=3333 
width=4)
-                     ->  Hash  (cost=137.67..137.67 rows=100 width=4)
-                           ->  HashAggregate  (cost=137.33..137.67 rows=100 
width=4)
-                                 Group Key: b.hundred
-                                 ->  Redistribute Motion 3:3  (slice2; 
segments: 3)  (cost=0.00..129.00 rows=3333 width=4)
-                                       Hash Key: b.hundred
-                                       ->  Seq Scan on tenk1 b  
(cost=0.00..62.33 rows=3333 width=4)
- Optimizer: Postgres query optimizer
-(13 rows)
+                                                          QUERY PLAN           
                                                
+-------------------------------------------------------------------------------------------------------------------------------
+ Finalize Aggregate  (cost=0.00..431.99 rows=1 width=8)
+   ->  Gather Motion 3:1  (slice1; segments: 3)  (cost=0.00..431.99 rows=1 
width=8)
+         ->  Partial Aggregate  (cost=0.00..431.99 rows=1 width=8)
+               ->  Nested Loop  (cost=0.00..431.99 rows=34 width=1)
+                     Join Filter: true
+                     ->  Broadcast Motion 3:3  (slice2; segments: 3)  
(cost=0.00..431.95 rows=100 width=4)
+                           ->  GroupAggregate  (cost=0.00..431.94 rows=34 
width=4)
+                                 Group Key: tenk1.hundred
+                                 ->  Sort  (cost=0.00..431.94 rows=34 width=4)
+                                       Sort Key: tenk1.hundred
+                                       ->  Redistribute Motion 3:3  (slice3; 
segments: 3)  (cost=0.00..431.94 rows=34 width=4)
+                                             Hash Key: tenk1.hundred
+                                             ->  Streaming HashAggregate  
(cost=0.00..431.94 rows=34 width=4)
+                                                   Group Key: tenk1.hundred
+                                                   ->  Seq Scan on tenk1  
(cost=0.00..431.51 rows=3334 width=4)
+                     ->  Index Only Scan using tenk1_unique1 on tenk1 tenk1_1  
(cost=0.00..0.04 rows=1 width=1)
+                           Index Cond: (unique1 = tenk1.hundred)
+ Optimizer: Pivotal Optimizer (GPORCA)
+(18 rows)
 
 EXPLAIN select count(distinct ss.ten) from
   (select ten from tenk1 a
@@ -1815,7 +1820,7 @@ EXPLAIN select count(distinct ss.ten) from
                                                    ->  Streaming HashAggregate 
 (cost=0.00..431.94 rows=34 width=4)
                                                          Group Key: 
tenk1_1.hundred
                                                          ->  Seq Scan on tenk1 
tenk1_1  (cost=0.00..431.51 rows=3334 width=4)
- Optimizer: Pivotal Optimizer (GPORCA) version 3.64.0
+ Optimizer: Pivotal Optimizer (GPORCA)
 (19 rows)
 
 --
@@ -1827,18 +1832,18 @@ EXPLAIN select count(distinct ss.ten) from
 EXPLAIN SELECT EXISTS(SELECT * FROM tenk1 WHERE tenk1.unique1 = tenk2.unique1) 
FROM tenk2 LIMIT 1;
                                           QUERY PLAN                           
               
 
----------------------------------------------------------------------------------------------
- Limit  (cost=0.00..865.43 rows=1 width=1)
-   ->  Gather Motion 3:1  (slice1; segments: 3)  (cost=0.00..865.43 rows=1 
width=1)
-         ->  Limit  (cost=0.00..865.43 rows=1 width=1)
-               ->  Hash Left Join  (cost=0.00..865.40 rows=3334 width=8)
+ Limit  (cost=0.00..865.45 rows=1 width=1)
+   ->  Gather Motion 3:1  (slice1; segments: 3)  (cost=0.00..865.45 rows=1 
width=1)
+         ->  Limit  (cost=0.00..865.45 rows=1 width=1)
+               ->  Hash Left Join  (cost=0.00..865.42 rows=3334 width=8)
                      Hash Cond: (tenk2.unique1 = tenk1.unique1)
-                     ->  Seq Scan on tenk2  (cost=0.00..431.50 rows=3334 
width=4)
-                     ->  Hash  (cost=431.95..431.95 rows=3334 width=12)
-                           ->  HashAggregate  (cost=0.00..431.95 rows=3334 
width=12)
+                     ->  Seq Scan on tenk2  (cost=0.00..431.51 rows=3334 
width=4)
+                     ->  Hash  (cost=431.96..431.96 rows=3334 width=12)
+                           ->  HashAggregate  (cost=0.00..431.96 rows=3334 
width=12)
                                  Group Key: tenk1.unique1
-                                 ->  Seq Scan on tenk1  (cost=0.00..431.50 
rows=3334 width=4)
+                                 ->  Seq Scan on tenk1  (cost=0.00..431.51 
rows=3334 width=4)
  Optimizer: Pivotal Optimizer (GPORCA)
-(19 rows)
+(11 rows)
 
 SELECT EXISTS(SELECT * FROM tenk1 WHERE tenk1.unique1 = tenk2.unique1) FROM 
tenk2 LIMIT 1;
  exists 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to