diff --git a/src/test/regress/expected/partition_prune.out b/src/test/regress/expected/partition_prune.out
index f0707e7f7ea..f01d0d41bfd 100644
--- a/src/test/regress/expected/partition_prune.out
+++ b/src/test/regress/expected/partition_prune.out
@@ -4468,4 +4468,17 @@ explain (costs off) select * from hp_contradict_test where a === 1 and b === 1 a
 drop table hp_contradict_test;
 drop operator class part_test_int4_ops2 using hash;
 drop operator ===(int4, int4);
+create table p (a int, b int, c float) partition by range(a);
+create table p1 partition of p for values from (0) to (100);
+create table p2 partition of p for values from (100) to (1000);
+insert into p select i%200, i%300, i%400 from
+generate_series(1, 1000)i;
+analyze p;
+SELECT * FROM check_estimated_rows('select b from p where c < 10 group by b');
+ estimated | actual 
+-----------+--------
+        27 |     29
+(1 row)
+
+drop table p;
 drop function explain_analyze(text);
diff --git a/src/test/regress/sql/partition_prune.sql b/src/test/regress/sql/partition_prune.sql
index ea9a4fe4a23..0e7a775e469 100644
--- a/src/test/regress/sql/partition_prune.sql
+++ b/src/test/regress/sql/partition_prune.sql
@@ -1353,4 +1353,15 @@ drop table hp_contradict_test;
 drop operator class part_test_int4_ops2 using hash;
 drop operator ===(int4, int4);
 
+create table p (a int, b int, c float) partition by range(a);
+create table p1 partition of p for values from (0) to (100);
+create table p2 partition of p for values from (100) to (1000);
+
+insert into p select i%200, i%300, i%400 from
+generate_series(1, 1000)i;
+
+analyze p;
+SELECT * FROM check_estimated_rows('select b from p where c < 10 group by b');
+
+drop table p;
 drop function explain_analyze(text);
