Skip to content

Commit 8dc719e

Browse files
committed
Fix some answer files
1 parent f4b7c5f commit 8dc719e

File tree

10 files changed

+82
-80
lines changed

10 files changed

+82
-80
lines changed

src/test/regress/expected/alter_table_gp.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ ANALYZE gp_test_fast_def;
266266
SELECT COUNT (DISTINCT ts) FROM gp_test_fast_def;
267267
count
268268
-------
269-
1
269+
3
270270
(1 row)
271271

272272
-- Create view with JOIN clause, drop column, check select to view not causing segfault

src/test/regress/expected/bfv_cte.out

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,13 +492,17 @@ select wait_until_query_output_to_file('/tmp/bfv_cte.out');
492492
-- end_matchsubs
493493
-- Filter out irrelevant LOG messages from segments other than seg2.
494494
\! cat /tmp/bfv_cte.out | grep -P '^(?!LOG)|^(LOG.*seg2)' | grep -vP 'LOG.*fault|decreased xslice state refcount'
495+
SET
496+
SET
497+
SET
495498
LOG: SISC (shareid=0, slice=2): initialized xslice state (seg2 slice2 127.0.1.1:7004 pid=1049102)
496499
LOG: SISC READER (shareid=0, slice=2): wrote notify_done (seg2 slice2 127.0.1.1:7004 pid=1049102)
497500
LOG: SISC WRITER (shareid=0, slice=4): initializing because squelched (seg2 slice4 127.0.1.1:7004 pid=1049114)
498501
LOG: SISC WRITER (shareid=0, slice=4): No tuplestore yet, creating tuplestore (seg2 slice4 127.0.1.1:7004 pid=1049114)
499502
LOG: SISC WRITER (shareid=0, slice=4): wrote notify_ready (seg2 slice4 127.0.1.1:7004 pid=1049114)
500503
LOG: SISC WRITER (shareid=0, slice=4): got DONE message from 1 readers (seg2 slice4 127.0.1.1:7004 pid=1049114)
501504
LOG: SISC (shareid=0, slice=4): removed xslice state (seg2 slice4 127.0.1.1:7004 pid=1049114)
505+
SET
502506
a | a
503507
---+---
504508
1 | 2

src/test/regress/expected/bfv_joins.out

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3511,6 +3511,7 @@ explain (costs off) select * from b, lateral (select * from a, c where b.i = a.i
35113511
---------------------------------------------------------------------------
35123512
Gather Motion 3:1 (slice1; segments: 3)
35133513
-> Nested Loop
3514+
Join Filter: ((a.i + b.i) = c.j)
35143515
-> Broadcast Motion 3:3 (slice2; segments: 3)
35153516
-> Seq Scan on b
35163517
-> Materialize

src/test/regress/expected/bfv_partition_plans.out

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -865,28 +865,28 @@ EVERY ('2 mons'::interval)
865865
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'oid' as the Apache Cloudberry data distribution key for this table.
866866
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
867867
explain analyze select a.* from mpp8031 a, mpp8031 b where a.oid = b.oid;
868-
QUERY PLAN
869-
---------------------------------------------------------------------------------------------------------------------------------------
870-
Gather Motion 3:1 (slice1; segments: 3) (cost=2743.00..2475974.00 rows=80883360 width=16) (actual time=0.807..0.807 rows=0 loops=1)
871-
-> Hash Join (cost=2743.00..1397529.20 rows=26961120 width=16) (never executed)
868+
QUERY PLAN
869+
------------------------------------------------------------------------------------------------------------------------------------------
870+
Gather Motion 3:1 (slice1; segments: 3) (cost=2743.00..2475974.00 rows=80883360 width=16) (actual time=0.707..0.709 rows=0 loops=1)
871+
-> Hash Join (cost=2743.00..1397529.20 rows=26961120 width=16) (actual time=0.024..0.028 rows=0 loops=1)
872872
Hash Cond: (a.oid = b.oid)
873-
-> Append (cost=0.00..1558.00 rows=94800 width=16) (never executed)
874-
-> Seq Scan on mpp8031_1_prt_foo_1 a_1 (cost=0.00..271.00 rows=23700 width=16) (never executed)
875-
-> Seq Scan on mpp8031_1_prt_2 a_2 (cost=0.00..271.00 rows=23700 width=16) (never executed)
876-
-> Seq Scan on mpp8031_1_prt_3 a_3 (cost=0.00..271.00 rows=23700 width=16) (never executed)
877-
-> Seq Scan on mpp8031_1_prt_4 a_4 (cost=0.00..271.00 rows=23700 width=16) (never executed)
873+
-> Append (cost=0.00..1558.00 rows=94800 width=16) (actual time=0.021..0.023 rows=0 loops=1)
874+
-> Seq Scan on mpp8031_1_prt_foo_1 a_1 (cost=0.00..271.00 rows=23700 width=16) (actual time=0.010..0.010 rows=0 loops=1)
875+
-> Seq Scan on mpp8031_1_prt_2 a_2 (cost=0.00..271.00 rows=23700 width=16) (actual time=0.003..0.004 rows=0 loops=1)
876+
-> Seq Scan on mpp8031_1_prt_3 a_3 (cost=0.00..271.00 rows=23700 width=16) (actual time=0.003..0.003 rows=0 loops=1)
877+
-> Seq Scan on mpp8031_1_prt_4 a_4 (cost=0.00..271.00 rows=23700 width=16) (actual time=0.003..0.003 rows=0 loops=1)
878878
-> Hash (cost=1558.00..1558.00 rows=94800 width=4) (never executed)
879879
-> Append (cost=0.00..1558.00 rows=94800 width=4) (never executed)
880880
-> Seq Scan on mpp8031_1_prt_foo_1 b_1 (cost=0.00..271.00 rows=23700 width=4) (never executed)
881881
-> Seq Scan on mpp8031_1_prt_2 b_2 (cost=0.00..271.00 rows=23700 width=4) (never executed)
882882
-> Seq Scan on mpp8031_1_prt_3 b_3 (cost=0.00..271.00 rows=23700 width=4) (never executed)
883883
-> Seq Scan on mpp8031_1_prt_4 b_4 (cost=0.00..271.00 rows=23700 width=4) (never executed)
884-
Planning Time: 2.439 ms
885-
(slice0) Executor memory: 51K bytes.
886-
(slice1) Executor memory: 57K bytes avg x 3 workers, 57K bytes max (seg0).
884+
Planning Time: 2.080 ms
885+
(slice0) Executor memory: 122K bytes.
886+
(slice1) Executor memory: 121K bytes avg x 3x(0) workers, 121K bytes max (seg0).
887887
Memory used: 128000kB
888888
Optimizer: Postgres query optimizer
889-
Execution Time: 1.481 ms
889+
Execution Time: 1.279 ms
890890
(20 rows)
891891

892892
drop table mpp8031;
@@ -1236,23 +1236,23 @@ EXPLAIN (COSTS OFF, TIMING OFF, SUMMARY OFF, ANALYZE) DELETE FROM delete_from_pt
12361236
-> Hash Semi Join (actual rows=1 loops=1)
12371237
Hash Cond: (delete_from_pt.b = t.a)
12381238
Extra Text: (seg0) Hash chain length 2.0 avg, 2 max, using 1 of 131072 buckets.
1239-
-> Append (actual rows=3 loops=1)
1239+
-> Append (actual rows=5 loops=1)
12401240
Partition Selectors: $1
12411241
-> Seq Scan on delete_from_pt_1_prt_1 delete_from_pt_2 (actual rows=3 loops=1)
1242-
-> Seq Scan on delete_from_pt_1_prt_2 delete_from_pt_3 (never executed)
1243-
-> Seq Scan on delete_from_pt_1_prt_3 delete_from_pt_4 (never executed)
1242+
-> Seq Scan on delete_from_pt_1_prt_2 delete_from_pt_3 (actual rows=3 loops=1)
1243+
-> Seq Scan on delete_from_pt_1_prt_3 delete_from_pt_4 (actual rows=0 loops=1)
12441244
-> Hash (actual rows=2 loops=1)
12451245
Buckets: 131072 Batches: 1 Memory Usage: 1025kB
12461246
-> Partition Selector (selector id: $1) (actual rows=2 loops=1)
12471247
-> Broadcast Motion 3:3 (slice1; segments: 3) (actual rows=2 loops=1)
12481248
-> Hash Join (actual rows=1 loops=1)
12491249
Hash Cond: (delete_from_pt_1.b = t.a)
12501250
Extra Text: (seg0) Hash chain length 1.0 avg, 1 max, using 1 of 262144 buckets.
1251-
-> Append (actual rows=3 loops=1)
1251+
-> Append (actual rows=5 loops=1)
12521252
Partition Selectors: $2
12531253
-> Seq Scan on delete_from_pt_1_prt_1 delete_from_pt_5 (actual rows=3 loops=1)
1254-
-> Seq Scan on delete_from_pt_1_prt_2 delete_from_pt_6 (never executed)
1255-
-> Seq Scan on delete_from_pt_1_prt_3 delete_from_pt_7 (never executed)
1254+
-> Seq Scan on delete_from_pt_1_prt_2 delete_from_pt_6 (actual rows=3 loops=1)
1255+
-> Seq Scan on delete_from_pt_1_prt_3 delete_from_pt_7 (actual rows=0 loops=1)
12561256
-> Hash (actual rows=1 loops=1)
12571257
Buckets: 262144 Batches: 1 Memory Usage: 2049kB
12581258
-> Partition Selector (selector id: $2) (actual rows=1 loops=1)

src/test/regress/expected/catcache.out

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ explain update dml_14027_union_s set a = (select null union select null)::numeri
4141
-> Append (cost=0.00..0.05 rows=2 width=32)
4242
-> Result (cost=0.00..0.01 rows=1 width=32)
4343
-> Result (cost=0.00..0.01 rows=1 width=32)
44-
-> Explicit Redistribute Motion 3:3 (slice1; segments: 3) (cost=0.00..2134.67 rows=66133 width=50)
45-
-> Split (cost=0.00..812.00 rows=66133 width=50)
46-
-> Append (cost=0.00..812.00 rows=33067 width=50)
47-
-> Seq Scan on dml_14027_union_s_1_prt_2 dml_14027_union_s_1 (cost=0.00..323.33 rows=16533 width=50)
48-
-> Seq Scan on dml_14027_union_s_1_prt_def dml_14027_union_s_2 (cost=0.00..323.33 rows=16533 width=50)
44+
-> Explicit Redistribute Motion 3:3 (slice1; segments: 3) (cost=0.00..2.12 rows=4 width=36)
45+
-> Split Update (cost=0.00..2.04 rows=4 width=36)
46+
-> Append (cost=0.00..2.04 rows=2 width=36)
47+
-> Seq Scan on dml_14027_union_s_1_prt_2 dml_14027_union_s_1 (cost=0.00..1.02 rows=1 width=36)
48+
-> Seq Scan on dml_14027_union_s_1_prt_def dml_14027_union_s_2 (cost=0.00..1.02 rows=1 width=36)
4949
Optimizer: Postgres query optimizer
5050
(17 rows)
5151

src/test/regress/expected/gp_recursive_cte.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,8 @@ with recursive the_cte_here(n) as (
594594
select * from the_cte_here;
595595
QUERY PLAN
596596
----------------------------------------------------------------------------------------------
597-
Recursive Union (cost=1.02..15.27 rows=34 width=4)
598-
-> Gather Motion 1:1 (slice1; segments: 1) (cost=1.02..1.02 rows=1 width=4)
597+
Recursive Union (cost=1.01..14.93 rows=34 width=4)
598+
-> Gather Motion 1:1 (slice1; segments: 1) (cost=1.01..1.01 rows=1 width=4)
599599
-> Seq Scan on t_rep_test_rcte (cost=0.00..1.01 rows=1 width=4)
600600
-> Hash Join (cost=1.09..1.36 rows=3 width=4)
601601
Hash Cond: (the_cte_here.n = t_rand_test_rcte.c)

src/test/regress/expected/oid_consistency.out

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,10 +762,12 @@ CREATE table oid_consistency_tt1 (a int) distributed by (a);
762762
CREATE table oid_consistency_tt2 (a int) distributed by (a);
763763
CREATE rule "_RETURN" as on select to oid_consistency_tt1
764764
do instead select * from oid_consistency_tt2;
765+
ERROR: relation "oid_consistency_tt1" cannot have ON SELECT rules
766+
DETAIL: This operation is not supported for tables.
765767
select verify('oid_consistency_tt1');
766768
verify
767769
--------
768-
1
770+
0
769771
(1 row)
770772

771773
--

src/test/regress/expected/partition_pruning.out

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,7 @@ EXPLAIN SELECT * FROM pt_lt_tab WHERE col2 <> 10 ORDER BY col2,col3 LIMIT 5;
488488
-> Incremental Sort (cost=135.46..2022.12 rows=15 width=12)
489489
Sort Key: pt_lt_tab.col2, pt_lt_tab.col3
490490
Presorted Key: pt_lt_tab.col2
491-
-> Merge Append (cost=0.73..2021.44 rows=15 width=12)
492-
Sort Key: pt_lt_tab.col2
491+
-> Append (cost=0.68..2021.21 rows=15 width=12)
493492
-> Index Scan using pt_lt_tab_1_prt_part1_col2_idx on pt_lt_tab_1_prt_part1 pt_lt_tab_1 (cost=0.14..404.23 rows=3 width=12)
494493
Filter: (col2 <> '10'::numeric)
495494
-> Index Scan using pt_lt_tab_1_prt_part2_col2_idx on pt_lt_tab_1_prt_part2 pt_lt_tab_2 (cost=0.14..404.23 rows=3 width=12)
@@ -501,7 +500,7 @@ EXPLAIN SELECT * FROM pt_lt_tab WHERE col2 <> 10 ORDER BY col2,col3 LIMIT 5;
501500
-> Index Scan using pt_lt_tab_1_prt_part5_col2_idx on pt_lt_tab_1_prt_part5 pt_lt_tab_5 (cost=0.14..404.23 rows=3 width=12)
502501
Filter: (col2 <> '10'::numeric)
503502
Optimizer: Postgres query optimizer
504-
(20 rows)
503+
(19 rows)
505504

506505
SELECT * FROM pt_lt_tab WHERE col2 > 10 AND col2 < 50 ORDER BY col2,col3 LIMIT 5;
507506
col1 | col2 | col3 | col4
@@ -523,8 +522,7 @@ EXPLAIN SELECT * FROM pt_lt_tab WHERE col2 > 10 AND col2 < 50 ORDER BY col2,col3
523522
-> Incremental Sort (cost=122.12..1577.88 rows=13 width=12)
524523
Sort Key: pt_lt_tab.col2, pt_lt_tab.col3
525524
Presorted Key: pt_lt_tab.col2
526-
-> Merge Append (cost=0.58..1577.29 rows=13 width=12)
527-
Sort Key: pt_lt_tab.col2
525+
-> Append (cost=0.54..1577.12 rows=13 width=12)
528526
-> Index Scan using pt_lt_tab_1_prt_part2_col2_idx on pt_lt_tab_1_prt_part2 pt_lt_tab_1 (cost=0.14..404.27 rows=3 width=12)
529527
Index Cond: ((col2 > '10'::numeric) AND (col2 < '50'::numeric))
530528
-> Index Scan using pt_lt_tab_1_prt_part3_col2_idx on pt_lt_tab_1_prt_part3 pt_lt_tab_2 (cost=0.14..404.27 rows=3 width=12)
@@ -556,8 +554,7 @@ EXPLAIN SELECT * FROM pt_lt_tab WHERE col2 > 10 OR col2 = 50 ORDER BY col2,col3
556554
-> Incremental Sort (cost=121.96..1617.78 rows=13 width=12)
557555
Sort Key: pt_lt_tab.col2, pt_lt_tab.col3
558556
Presorted Key: pt_lt_tab.col2
559-
-> Merge Append (cost=0.58..1617.18 rows=13 width=12)
560-
Sort Key: pt_lt_tab.col2
557+
-> Append (cost=0.54..1617.01 rows=13 width=12)
561558
-> Index Scan using pt_lt_tab_1_prt_part2_col2_idx on pt_lt_tab_1_prt_part2 pt_lt_tab_1 (cost=0.14..404.24 rows=3 width=12)
562559
Filter: ((col2 > '10'::numeric) OR (col2 = '50'::numeric))
563560
-> Index Scan using pt_lt_tab_1_prt_part3_col2_idx on pt_lt_tab_1_prt_part3 pt_lt_tab_2 (cost=0.14..404.24 rows=3 width=12)
@@ -589,8 +586,7 @@ EXPLAIN SELECT * FROM pt_lt_tab WHERE col2 between 10 AND 50 ORDER BY col2,col3
589586
-> Incremental Sort (cost=116.85..1662.17 rows=14 width=12)
590587
Sort Key: pt_lt_tab.col2, pt_lt_tab.col3
591588
Presorted Key: pt_lt_tab.col2
592-
-> Merge Append (cost=0.73..1661.52 rows=14 width=12)
593-
Sort Key: pt_lt_tab.col2
589+
-> Append (cost=0.68..1661.30 rows=14 width=12)
594590
-> Index Scan using pt_lt_tab_1_prt_part1_col2_idx on pt_lt_tab_1_prt_part1 pt_lt_tab_1 (cost=0.14..44.15 rows=1 width=12)
595591
Index Cond: ((col2 >= '10'::numeric) AND (col2 <= '50'::numeric))
596592
-> Index Scan using pt_lt_tab_1_prt_part2_col2_idx on pt_lt_tab_1_prt_part2 pt_lt_tab_2 (cost=0.14..404.27 rows=3 width=12)
@@ -736,8 +732,7 @@ EXPLAIN SELECT * FROM pt_lt_tab WHERE col2 > 10 AND col1 = 10 ORDER BY col2,col3
736732
-> Incremental Sort (cost=44.62..176.90 rows=4 width=12)
737733
Sort Key: pt_lt_tab.col2, pt_lt_tab.col3
738734
Presorted Key: pt_lt_tab.col2
739-
-> Merge Append (cost=0.58..176.72 rows=4 width=12)
740-
Sort Key: pt_lt_tab.col2
735+
-> Append (cost=0.54..176.64 rows=4 width=12)
741736
-> Index Scan using pt_lt_tab_1_prt_part2_col1_col2_idx on pt_lt_tab_1_prt_part2 pt_lt_tab_1 (cost=0.14..44.15 rows=1 width=12)
742737
Index Cond: ((col1 = 10) AND (col2 > '10'::numeric))
743738
-> Index Scan using pt_lt_tab_1_prt_part3_col1_col2_idx on pt_lt_tab_1_prt_part3 pt_lt_tab_2 (cost=0.14..44.15 rows=1 width=12)

0 commit comments

Comments
 (0)