Skip to content

Commit

Permalink
fix nestloop cases
Browse files Browse the repository at this point in the history
  • Loading branch information
avamingli committed Oct 12, 2024
1 parent 98c056f commit c348b2c
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions src/test/regress/expected/cbdb_parallel.out
Original file line number Diff line number Diff line change
Expand Up @@ -207,23 +207,26 @@ select sum(bar.b) from bar where exists (select 1 from foo where foo.a = bar.b);
QUERY PLAN
------------------------------------------------------------------------------------------
Finalize Aggregate
-> Gather Motion 3:1 (slice1; segments: 3)
-> Gather Motion 6:1 (slice1; segments: 6)
-> Partial Aggregate
-> HashAggregate
Group Key: (RowIdExpr)
-> Redistribute Motion 3:3 (slice2; segments: 3)
-> Redistribute Motion 6:6 (slice2; segments: 6)
Hash Key: (RowIdExpr)
Hash Module: 3
-> Nested Loop
Join Filter: (bar.b = foo.a)
-> Redistribute Motion 3:3 (slice3; segments: 3)
Hash Key: foo.a
-> Seq Scan on foo
-> Redistribute Motion 6:6 (slice3; segments: 6)
Hash Key: bar.b
Hash Module: 3
-> Parallel Seq Scan on bar
-> Materialize
-> Redistribute Motion 3:3 (slice4; segments: 3)
Hash Key: bar.b
-> Seq Scan on bar
-> Redistribute Motion 3:6 (slice4; segments: 3)
Hash Key: foo.a
Hash Module: 3
-> Seq Scan on foo
Optimizer: Postgres query optimizer
(17 rows)
(20 rows)

select sum(bar.b) from bar where exists (select 1 from foo where foo.a = bar.b);
sum
Expand All @@ -239,23 +242,26 @@ select sum(bar.b) from bar where exists (select 1 from foo where foo.a = bar.b);
QUERY PLAN
------------------------------------------------------------------------------------------
Finalize Aggregate
-> Gather Motion 3:1 (slice1; segments: 3)
-> Gather Motion 6:1 (slice1; segments: 6)
-> Partial Aggregate
-> HashAggregate
Group Key: (RowIdExpr)
-> Redistribute Motion 3:3 (slice2; segments: 3)
-> Redistribute Motion 6:6 (slice2; segments: 6)
Hash Key: (RowIdExpr)
Hash Module: 3
-> Nested Loop
Join Filter: (bar.b = foo.a)
-> Redistribute Motion 3:3 (slice3; segments: 3)
-> Redistribute Motion 6:6 (slice3; segments: 6)
Hash Key: foo.a
-> Seq Scan on foo
Hash Module: 3
-> Parallel Seq Scan on foo
-> Materialize
-> Redistribute Motion 3:3 (slice4; segments: 3)
-> Redistribute Motion 3:6 (slice4; segments: 3)
Hash Key: bar.b
Hash Module: 3
-> Seq Scan on bar
Optimizer: Postgres query optimizer
(17 rows)
(20 rows)

select sum(bar.b) from bar where exists (select 1 from foo where foo.a = bar.b);
sum
Expand Down

0 comments on commit c348b2c

Please sign in to comment.