You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by ma...@apache.org on 2025/01/07 06:21:43 UTC
(cloudberry) 02/11: Fix a flaky test case querying pg_class
This is an automated email from the ASF dual-hosted git repository.
maxyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit 3d66a5074eb5007314d89c6ee0e765c1978dac8e
Author: Adam Lee <ad...@vmware.com>
AuthorDate: Tue Jan 31 13:53:36 2023 +0800
Fix a flaky test case querying pg_class
`relname` of `pg_class` has an index, the stats and plan can be
influenced by other tests running in parallel. Use `relnatts` instead.
```
{
'id' => 5,
'parent' => 2,
- 'short' => 'Seq Scan on pg_class'
+ 'short' => 'Index Only Scan using pg_class_tblspc_relfilenode_index on pg_class'
}
],
'id' => 2,
```
---
src/test/regress/expected/aggregates.out | 9 +++------
src/test/regress/expected/aggregates_optimizer.out | 9 +++------
src/test/regress/sql/aggregates.sql | 9 +++------
3 files changed, 9 insertions(+), 18 deletions(-)
diff --git a/src/test/regress/expected/aggregates.out b/src/test/regress/expected/aggregates.out
index b932b05dfb..f8572ddb2a 100644
--- a/src/test/regress/expected/aggregates.out
+++ b/src/test/regress/expected/aggregates.out
@@ -3258,12 +3258,9 @@ drop table agg_hash_1;
-- drop table agg_hash_2;
drop table agg_hash_3;
drop table agg_hash_4;
--- fix github issue #12061 numsegments of general locus is not -1 on create_minmaxagg_path
-/*
- * On the arm platform, `Seq Scan` is executed frequently, resulting in unstable output.
- */
-set enable_indexonlyscan = off;
-explain analyze select count(*) from pg_class, (select count(*) >0 from (select count(*) from pg_class where relname like 't%')x)y;
+-- GitHub issue https://github.com/greenplum-db/gpdb/issues/12061
+-- numsegments of the general locus should be -1 on create_minmaxagg_path
+explain analyze select count(*) from pg_class, (select count(*) > 0 from (select count(*) from pg_class where relnatts > 8) x) y;
QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------
Aggregate (cost=10000000025.03..10000000025.05 rows=1 width=8) (actual time=0.214..0.214 rows=1 loops=1)
diff --git a/src/test/regress/expected/aggregates_optimizer.out b/src/test/regress/expected/aggregates_optimizer.out
index 46e3b26094..5aac06ae99 100644
--- a/src/test/regress/expected/aggregates_optimizer.out
+++ b/src/test/regress/expected/aggregates_optimizer.out
@@ -3482,12 +3482,9 @@ drop table agg_hash_1;
-- drop table agg_hash_2;
drop table agg_hash_3;
drop table agg_hash_4;
--- fix github issue #12061 numsegments of general locus is not -1 on create_minmaxagg_path
-/*
- * On the arm platform, `Seq Scan` is executed frequently, resulting in unstable output.
- */
-set enable_indexonlyscan = off;
-explain analyze select count(*) from pg_class, (select count(*) >0 from (select count(*) from pg_class where relname like 't%')x)y;
+-- GitHub issue https://github.com/greenplum-db/gpdb/issues/12061
+-- numsegments of the general locus should be -1 on create_minmaxagg_path
+explain analyze select count(*) from pg_class, (select count(*) > 0 from (select count(*) from pg_class where relnatts > 8) x) y;
INFO: GPORCA failed to produce a plan, falling back to planner
DETAIL: Feature not supported: Queries on master-only tables
QUERY PLAN
diff --git a/src/test/regress/sql/aggregates.sql b/src/test/regress/sql/aggregates.sql
index 16b811d9bb..4ae3bb5bfd 100644
--- a/src/test/regress/sql/aggregates.sql
+++ b/src/test/regress/sql/aggregates.sql
@@ -1436,9 +1436,6 @@ drop table agg_hash_1;
drop table agg_hash_3;
drop table agg_hash_4;
--- fix github issue #12061 numsegments of general locus is not -1 on create_minmaxagg_path
-/*
- * On the arm platform, `Seq Scan` is executed frequently, resulting in unstable output.
- */
-set enable_indexonlyscan = off;
-explain analyze select count(*) from pg_class, (select count(*) >0 from (select count(*) from pg_class where relname like 't%')x)y;
+-- GitHub issue https://github.com/greenplum-db/gpdb/issues/12061
+-- numsegments of the general locus should be -1 on create_minmaxagg_path
+explain analyze select count(*) from pg_class, (select count(*) > 0 from (select count(*) from pg_class where relnatts > 8) x) y;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org