From b67238a64d7d90b39beab53dc2b13e7d04cecdc3 Mon Sep 17 00:00:00 2001 From: Zhang Mingli Date: Fri, 10 Nov 2023 10:29:29 +0800 Subject: [PATCH] Use pg_class instead of gp_segment_configuration to test Entry. Commit 371fc971fef ignore cases related to external_fts. When external_fts is on Seq scan on gp_segment_configuration would be replaced by Function Scan on gp_get_segment_configuration Inconsistence between CIs will cause such cases to fail. To avoid copying large unnecessary cases for just one or several case using gp_segment_configuration, use pg_class to test Entry locus. Authored-by: Zhang Mingli avamingli@gmail.com --- src/test/regress/expected/rpt_joins.out | 10 ++++------ src/test/regress/sql/rpt_joins.sql | 6 ++---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/test/regress/expected/rpt_joins.out b/src/test/regress/expected/rpt_joins.out index 6896b8a092c..ea609e9e70d 100644 --- a/src/test/regress/expected/rpt_joins.out +++ b/src/test/regress/expected/rpt_joins.out @@ -2376,19 +2376,18 @@ explain(costs off) with cte1 as (insert into rpt_issue_15860 values (1, 2) retur Optimizer: Postgres query optimizer (10 rows) --- start_ignore -- When external_fts is on -- Seq scan on gp_segment_configuration would be replaced by -- Function Scan on gp_get_segment_configuration -- Inconsistence between CIs will cause such cases to fail. --- Ignore these as workaround. +-- Use other catalog to test Entry. -- Replicate join Entry. -explain(costs off) with cte1 as (insert into rpt_issue_15860 values (1, 2) returning *) select * from cte1 join gp_segment_configuration g on g.dbid = cte1.c1; +explain(costs off) with cte1 as (insert into rpt_issue_15860 values (1, 2) returning *) select * from cte1 join pg_class c on c.oid = cte1.c1; QUERY PLAN --------------------------------------------------------------- Hash Join - Hash Cond: (g.dbid = rpt_issue_15860.c1) - -> Seq Scan on gp_segment_configuration g + Hash Cond: (c.oid = (rpt_issue_15860.c1)::oid) + -> Seq Scan on pg_class c -> Hash -> Explicit Gather Motion 3:1 (slice1; segments: 3) -> Insert on rpt_issue_15860 @@ -2396,7 +2395,6 @@ explain(costs off) with cte1 as (insert into rpt_issue_15860 values (1, 2) retur Optimizer: Postgres query optimizer (8 rows) --- end_ignore -- -- Begin of Replicated join Partitioned. -- diff --git a/src/test/regress/sql/rpt_joins.sql b/src/test/regress/sql/rpt_joins.sql index bd1ba37371a..9c303c3eb9d 100644 --- a/src/test/regress/sql/rpt_joins.sql +++ b/src/test/regress/sql/rpt_joins.sql @@ -502,15 +502,13 @@ explain(costs off) with cte1 as (insert into rpt_issue_15860 values (1, 2) retur explain(costs off) with cte1 as (insert into rpt_issue_15860 values (1, 2) returning *) select * from cte1 right join (select count(*) as c from hash_issue_15860) a on a.c = cte1.c1; explain(costs off) with cte1 as (insert into rpt_issue_15860 values (1, 2) returning *) select * from cte1 full join (select count(*) as c from hash_issue_15860) a on a.c = cte1.c1; --- start_ignore -- When external_fts is on -- Seq scan on gp_segment_configuration would be replaced by -- Function Scan on gp_get_segment_configuration -- Inconsistence between CIs will cause such cases to fail. --- Ignore these as workaround. +-- Use other catalog to test Entry. -- Replicate join Entry. -explain(costs off) with cte1 as (insert into rpt_issue_15860 values (1, 2) returning *) select * from cte1 join gp_segment_configuration g on g.dbid = cte1.c1; --- end_ignore +explain(costs off) with cte1 as (insert into rpt_issue_15860 values (1, 2) returning *) select * from cte1 join pg_class c on c.oid = cte1.c1; -- -- Begin of Replicated join Partitioned.