Skip to content

Commit

Permalink
Update tests run locally
Browse files Browse the repository at this point in the history
  • Loading branch information
bandetto committed Dec 27, 2023
1 parent a9273ff commit 7567bb8
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 134 deletions.
17 changes: 8 additions & 9 deletions src/test/regress/expected/bfv_dml.out
Original file line number Diff line number Diff line change
Expand Up @@ -521,17 +521,16 @@ alter table bar set with(REORGANIZE=false) distributed randomly;
analyze foo;
analyze bar;
explain delete from foo using bar;
QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------
QUERY PLAN
--------------------------------------------------------------------------------------------------
Delete on foo (cost=10000000000.00..10000000009.98 rows=34 width=16)
-> Explicit Redistribute Motion 3:3 (slice2; segments: 3) (cost=10000000000.00..10000000009.98 rows=34 width=16)
-> Nested Loop (cost=10000000000.00..10000000009.98 rows=34 width=16)
-> Seq Scan on foo (cost=0.00..3.10 rows=4 width=10)
-> Materialize (cost=0.00..3.65 rows=10 width=6)
-> Broadcast Motion 3:3 (slice1; segments: 3) (cost=0.00..3.50 rows=10 width=6)
-> Seq Scan on bar (cost=0.00..3.10 rows=4 width=6)
-> Nested Loop (cost=10000000000.00..10000000009.98 rows=34 width=16)
-> Seq Scan on foo (cost=0.00..3.10 rows=4 width=10)
-> Materialize (cost=0.00..3.65 rows=10 width=6)
-> Broadcast Motion 3:3 (slice1; segments: 3) (cost=0.00..3.50 rows=10 width=6)
-> Seq Scan on bar (cost=0.00..3.10 rows=4 width=6)
Optimizer: Postgres query optimizer
(8 rows)
(7 rows)

delete from foo using bar;
drop table foo;
Expand Down
56 changes: 27 additions & 29 deletions src/test/regress/expected/gp_unique_rowid.out
Original file line number Diff line number Diff line change
Expand Up @@ -192,22 +192,21 @@ where e.x in
select b from t2_12512
)
;
QUERY PLAN
---------------------------------------------------------------------------
QUERY PLAN
---------------------------------------------------------------------
Update on t_12512
-> Explicit Redistribute Motion 3:3 (slice2; segments: 3)
-> HashAggregate
Group Key: t_12512.ctid, x.ctid
-> Hash Join
Hash Cond: (x.x = t2_12512.b)
-> Nested Loop
-> Seq Scan on t_12512
-> Function Scan on x
-> Hash
-> Broadcast Motion 3:3 (slice1; segments: 3)
-> Seq Scan on t2_12512
-> HashAggregate
Group Key: t_12512.ctid, x.ctid
-> Hash Join
Hash Cond: (x.x = t2_12512.b)
-> Nested Loop
-> Seq Scan on t_12512
-> Function Scan on x
-> Hash
-> Broadcast Motion 3:3 (slice1; segments: 3)
-> Seq Scan on t2_12512
Optimizer: Postgres query optimizer
(13 rows)
(12 rows)

update t_12512 set b = 1
from
Expand All @@ -231,23 +230,22 @@ where e.x in
select b from t2_12512
)
;
QUERY PLAN
---------------------------------------------------------------------------
QUERY PLAN
---------------------------------------------------------------------
Update on t_12512
-> Explicit Redistribute Motion 3:3 (slice2; segments: 3)
-> HashAggregate
Group Key: t_12512.ctid, "*VALUES*".ctid
-> Hash Join
Hash Cond: ("*VALUES*".column1 = t2_12512.b)
-> Nested Loop
-> Seq Scan on t_12512
-> Materialize
-> Values Scan on "*VALUES*"
-> Hash
-> Broadcast Motion 3:3 (slice1; segments: 3)
-> Seq Scan on t2_12512
-> HashAggregate
Group Key: t_12512.ctid, "*VALUES*".ctid
-> Hash Join
Hash Cond: ("*VALUES*".column1 = t2_12512.b)
-> Nested Loop
-> Seq Scan on t_12512
-> Materialize
-> Values Scan on "*VALUES*"
-> Hash
-> Broadcast Motion 3:3 (slice1; segments: 3)
-> Seq Scan on t2_12512
Optimizer: Postgres query optimizer
(14 rows)
(13 rows)

update t_12512 set b = 1
from
Expand Down
37 changes: 18 additions & 19 deletions src/test/regress/expected/partition_pruning.out
Original file line number Diff line number Diff line change
Expand Up @@ -3498,26 +3498,25 @@ from (
) src
where trg.key1 = src.key1
and trg.key1 = 2;
QUERY PLAN
-------------------------------------------------------------------------------------------
QUERY PLAN
-------------------------------------------------------------------------------------
Update on t_part1_1_prt_2 trg
-> Explicit Redistribute Motion 3:3 (slice3; segments: 3)
-> Nested Loop
-> Seq Scan on t_part1_1_prt_2 trg
Filter: (key1 = 2)
-> Materialize
-> Redistribute Motion 1:3 (slice2; segments: 1)
Hash Key: src.key1
-> Subquery Scan on src
Filter: (src.key1 = 2)
-> WindowAgg
-> Gather Motion 3:1 (slice1; segments: 3)
-> Result
-> Append
-> Seq Scan on t_part1_1_prt_2 r
Filter: (key1 = 2)
Optimizer: Postgres query optimizer
(17 rows)
-> Nested Loop
-> Seq Scan on t_part1_1_prt_2 trg
Filter: (key1 = 2)
-> Materialize
-> Redistribute Motion 1:3 (slice2; segments: 1)
Hash Key: src.key1
-> Subquery Scan on src
Filter: (src.key1 = 2)
-> WindowAgg
-> Gather Motion 3:1 (slice1; segments: 3)
-> Result
-> Append
-> Seq Scan on t_part1_1_prt_2 r
Filter: (key1 = 2)
Optimizer: Postgres query optimizer
(16 rows)

DROP TABLE t_part1;
-- Test that the dynamic partition pruning should not be performed if the partition's opclass and the
Expand Down
42 changes: 20 additions & 22 deletions src/test/regress/expected/qp_subquery.out
Original file line number Diff line number Diff line change
Expand Up @@ -1073,32 +1073,30 @@ create table TabDel4(a int not null, b int not null);
insert into TabDel4 values(1,2);
commit;
explain delete from TabDel1 where TabDel1.a not in (select a from TabDel3); -- do not support this because we produce NLASJ
QUERY PLAN
-------------------------------------------------------------------------------------------------------
Delete on tabdel1 (cost=1.09..3.17 rows=2 width=16)
-> Explicit Redistribute Motion 3:3 (slice2; segments: 3) (cost=1.09..3.17 rows=2 width=10)
-> Hash Left Anti Semi (Not-In) Join (cost=1.09..3.17 rows=2 width=10)
Hash Cond: tabdel1.a = tabdel3.a
-> Seq Scan on tabdel1 (cost=0.00..2.03 rows=1 width=14)
-> Hash (cost=1.05..1.05 rows=1 width=4)
-> Broadcast Motion 3:3 (slice1; segments: 3) (cost=0.00..1.05 rows=1 width=4)
-> Seq Scan on tabdel3 (cost=0.00..1.01 rows=1 width=4)
Optimizer status: Postgres query optimizer
(9 rows)
QUERY PLAN
--------------------------------------------------------------------------------------------------
Delete on tabdel1 (cost=1.09..4.17 rows=2 width=16)
-> Hash Left Anti Semi (Not-In) Join (cost=1.09..4.17 rows=2 width=16)
Hash Cond: (tabdel1.a = tabdel3.a)
-> Seq Scan on tabdel1 (cost=0.00..3.03 rows=1 width=14)
-> Hash (cost=1.05..1.05 rows=1 width=10)
-> Broadcast Motion 3:3 (slice1; segments: 3) (cost=0.00..1.05 rows=1 width=10)
-> Seq Scan on tabdel3 (cost=0.00..1.01 rows=1 width=10)
Optimizer: Postgres query optimizer
(8 rows)

explain delete from TabDel2 where TabDel2.a not in (select a from TabDel4); -- support this
QUERY PLAN
--------------------------------------------------------------------------------------------------------
QUERY PLAN
--------------------------------------------------------------------------------------------------
Delete on tabdel2 (cost=1.09..4.17 rows=2 width=16)
-> Explicit Redistribute Motion 3:3 (slice2; segments: 3) (cost=1.09..4.17 rows=2 width=16)
-> Hash Left Anti Semi (Not-In) Join (cost=1.09..4.17 rows=2 width=16)
Hash Cond: (tabdel2.a = tabdel4.a)
-> Seq Scan on tabdel2 (cost=0.00..3.03 rows=1 width=14)
-> Hash (cost=1.05..1.05 rows=1 width=10)
-> Broadcast Motion 3:3 (slice1; segments: 3) (cost=0.00..1.05 rows=1 width=10)
-> Seq Scan on tabdel4 (cost=0.00..1.01 rows=1 width=10)
-> Hash Left Anti Semi (Not-In) Join (cost=1.09..4.17 rows=2 width=16)
Hash Cond: (tabdel2.a = tabdel4.a)
-> Seq Scan on tabdel2 (cost=0.00..3.03 rows=1 width=14)
-> Hash (cost=1.05..1.05 rows=1 width=10)
-> Broadcast Motion 3:3 (slice1; segments: 3) (cost=0.00..1.05 rows=1 width=10)
-> Seq Scan on tabdel4 (cost=0.00..1.01 rows=1 width=10)
Optimizer: Postgres query optimizer
(9 rows)
(8 rows)

delete from TabDel2 where TabDel2.a not in (select a from TabDel4);
select * from TabDel2;
Expand Down
103 changes: 48 additions & 55 deletions src/test/regress/expected/update_gp.out
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ NOTICE: merging column "a" with inherited definition
NOTICE: merging column "b" with inherited definition
insert into base_tbl select g, g from generate_series(1, 5) g;
explain (costs off) update base_tbl set a=a+1;
QUERY PLAN
---------------------------------------------------------------
QUERY PLAN
------------------------------------------------------
Update on base_tbl
-> Redistribute Motion 3:3 (slice1; segments: 3)
Hash Key: ((base_tbl.a + 1))
Expand All @@ -93,10 +93,9 @@ explain (costs off) update base_tbl set a=a+1;
Hash Key: ((child_a.a + 1))
-> Split
-> Seq Scan on child_a
-> Explicit Redistribute Motion 3:3 (slice3; segments: 3)
-> Seq Scan on child_b
-> Seq Scan on child_b
Optimizer: Postgres query optimizer
(12 rows)
(11 rows)

update base_tbl set a = 5;
--
Expand Down Expand Up @@ -623,26 +622,24 @@ insert into t2_13265 values (2, null, 2, 2);
explain (verbose, costs off)
update t1_13265 set b = 2 where
(c, d) not in (select c, d from t2_13265 where a = 2);
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------
QUERY PLAN
-------------------------------------------------------------------------------------------------------------
Update on public.t1_13265
-> Explicit Redistribute Motion 3:3 (slice2; segments: 3)
-> Nested Loop Left Anti Semi (Not-In) Join
Output: t1_13265.a, 2, t1_13265.c, t1_13265.d, t1_13265.ctid, t1_13265.gp_segment_id, t2_13265.ctid
-> Nested Loop Left Anti Semi (Not-In) Join
Output: t1_13265.a, 2, t1_13265.c, t1_13265.d, t1_13265.ctid, t1_13265.gp_segment_id, t2_13265.ctid
Join Filter: ((t1_13265.c = t2_13265.c) AND (t1_13265.d = t2_13265.d))
-> Seq Scan on public.t1_13265
Output: t1_13265.a, t1_13265.c, t1_13265.d, t1_13265.ctid, t1_13265.gp_segment_id
-> Materialize
Join Filter: ((t1_13265.c = t2_13265.c) AND (t1_13265.d = t2_13265.d))
-> Seq Scan on public.t1_13265
Output: t1_13265.a, t1_13265.c, t1_13265.d, t1_13265.ctid, t1_13265.gp_segment_id
-> Materialize
Output: t2_13265.ctid, t2_13265.c, t2_13265.d, (2)
-> Broadcast Motion 1:3 (slice1; segments: 1)
Output: t2_13265.ctid, t2_13265.c, t2_13265.d, (2)
-> Broadcast Motion 3:3 (slice1; segments: 3)
Output: t2_13265.ctid, t2_13265.c, t2_13265.d, (2)
-> Seq Scan on public.t2_13265
Output: t2_13265.ctid, t2_13265.c, t2_13265.d, 2
Filter: (t2_13265.a = 2)
-> Seq Scan on public.t2_13265
Output: t2_13265.ctid, t2_13265.c, t2_13265.d, 2
Filter: (t2_13265.a = 2)
Optimizer: Postgres query optimizer
Settings: optimizer=off
(17 rows)
(15 rows)

update t1_13265 set b = 2 where
(c, d) not in (select c, d from t2_13265 where a = 2);
Expand Down Expand Up @@ -678,43 +675,39 @@ insert into from_table select i*1.5,i*2,i*3,'xx'||i,'yy'||i, i+1 from generate_s
explain (costs off)
update into_table set d=from_table.d, e=from_table.e, f=from_table.f from from_table
where into_table.a=from_table.a and into_table.b=from_table.b and into_table.c=from_table.c;
QUERY PLAN
------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN
------------------------------------------------------------------------------------------------------------------------------------------------
Update on into_table_1_prt_1
-> Explicit Redistribute Motion 3:3 (slice2; segments: 3)
-> Hash Join
Hash Cond: ((into_table_1_prt_1.a = from_table.a) AND (into_table_1_prt_1.b = from_table.b) AND (into_table_1_prt_1.c = from_table.c))
-> Seq Scan on into_table_1_prt_1
-> Hash
-> Redistribute Motion 3:3 (slice1; segments: 3)
Hash Key: from_table.a, from_table.b, from_table.c
-> Seq Scan on from_table
-> Explicit Redistribute Motion 3:3 (slice4; segments: 3)
-> Hash Join
Hash Cond: ((into_table_1_prt_2.a = from_table.a) AND (into_table_1_prt_2.b = from_table.b) AND (into_table_1_prt_2.c = from_table.c))
-> Seq Scan on into_table_1_prt_2
-> Hash
-> Redistribute Motion 3:3 (slice3; segments: 3)
Hash Key: from_table.a, from_table.b, from_table.c
-> Seq Scan on from_table
-> Explicit Redistribute Motion 3:3 (slice6; segments: 3)
-> Hash Join
Hash Cond: ((into_table_1_prt_3.a = from_table.a) AND (into_table_1_prt_3.b = from_table.b) AND (into_table_1_prt_3.c = from_table.c))
-> Seq Scan on into_table_1_prt_3
-> Hash
-> Redistribute Motion 3:3 (slice5; segments: 3)
Hash Key: from_table.a, from_table.b, from_table.c
-> Seq Scan on from_table
-> Explicit Redistribute Motion 3:3 (slice8; segments: 3)
-> Hash Join
Hash Cond: ((into_table_1_prt_4.a = from_table.a) AND (into_table_1_prt_4.b = from_table.b) AND (into_table_1_prt_4.c = from_table.c))
-> Seq Scan on into_table_1_prt_4
-> Hash
-> Redistribute Motion 3:3 (slice7; segments: 3)
Hash Key: from_table.a, from_table.b, from_table.c
-> Seq Scan on from_table
-> Hash Join
Hash Cond: ((into_table_1_prt_1.a = from_table.a) AND (into_table_1_prt_1.b = from_table.b) AND (into_table_1_prt_1.c = from_table.c))
-> Seq Scan on into_table_1_prt_1
-> Hash
-> Redistribute Motion 3:3 (slice1; segments: 3)
Hash Key: from_table.a, from_table.b, from_table.c
-> Seq Scan on from_table
-> Hash Join
Hash Cond: ((into_table_1_prt_2.a = from_table.a) AND (into_table_1_prt_2.b = from_table.b) AND (into_table_1_prt_2.c = from_table.c))
-> Seq Scan on into_table_1_prt_2
-> Hash
-> Redistribute Motion 3:3 (slice2; segments: 3)
Hash Key: from_table.a, from_table.b, from_table.c
-> Seq Scan on from_table
-> Hash Join
Hash Cond: ((into_table_1_prt_3.a = from_table.a) AND (into_table_1_prt_3.b = from_table.b) AND (into_table_1_prt_3.c = from_table.c))
-> Seq Scan on into_table_1_prt_3
-> Hash
-> Redistribute Motion 3:3 (slice3; segments: 3)
Hash Key: from_table.a, from_table.b, from_table.c
-> Seq Scan on from_table
-> Hash Join
Hash Cond: ((into_table_1_prt_4.a = from_table.a) AND (into_table_1_prt_4.b = from_table.b) AND (into_table_1_prt_4.c = from_table.c))
-> Seq Scan on into_table_1_prt_4
-> Hash
-> Redistribute Motion 3:3 (slice4; segments: 3)
Hash Key: from_table.a, from_table.b, from_table.c
-> Seq Scan on from_table
Optimizer: Postgres query optimizer
(34 rows)
(30 rows)

-- start_matchsubs
-- m/"into_table_1_prt_\d" to partition "into_table_1_prt_\d"/
Expand Down

0 comments on commit 7567bb8

Please sign in to comment.