Skip to content

Commit

Permalink
Fix flaky transparent_decompress_chunk
Browse files Browse the repository at this point in the history
It can pick merge joins in favor of hash joins when testing outer
joins. Since these tests are only testing outer joins and currently
uses hash joins, we ensure that it will consistently pick those by
disabling merge joins for these queries only. Merge join is used for
other queries, so we do not disable merge join for the entire test.
  • Loading branch information
mkindahl committed Sep 23, 2024
1 parent c9c3191 commit d29ccee
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tsl/test/shared/expected/transparent_decompress_chunk-14.out
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,9 @@ QUERY PLAN

-- test OUTER JOIN
SET min_parallel_table_scan_size TO '0';
-- Disable merge join to get stable tests. These queries uses hash
-- joins.
SET enable_mergejoin TO off;
:PREFIX_NO_VERBOSE
SELECT *
FROM :TEST_TABLE m1
Expand Down Expand Up @@ -877,6 +880,7 @@ QUERY PLAN
-> Seq Scan on compress_hyper_X_X_chunk compress_hyper_X_X_chunk_1
(10 rows)

RESET enable_mergejoin;
RESET parallel_leader_participation;
:PREFIX
SELECT *
Expand Down
4 changes: 4 additions & 0 deletions tsl/test/shared/expected/transparent_decompress_chunk-15.out
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,9 @@ QUERY PLAN

-- test OUTER JOIN
SET min_parallel_table_scan_size TO '0';
-- Disable merge join to get stable tests. These queries uses hash
-- joins.
SET enable_mergejoin TO off;
:PREFIX_NO_VERBOSE
SELECT *
FROM :TEST_TABLE m1
Expand Down Expand Up @@ -879,6 +882,7 @@ QUERY PLAN
-> Seq Scan on compress_hyper_X_X_chunk compress_hyper_X_X_chunk_1
(10 rows)

RESET enable_mergejoin;
RESET parallel_leader_participation;
:PREFIX
SELECT *
Expand Down
4 changes: 4 additions & 0 deletions tsl/test/shared/expected/transparent_decompress_chunk-16.out
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,9 @@ QUERY PLAN

-- test OUTER JOIN
SET min_parallel_table_scan_size TO '0';
-- Disable merge join to get stable tests. These queries uses hash
-- joins.
SET enable_mergejoin TO off;
:PREFIX_NO_VERBOSE
SELECT *
FROM :TEST_TABLE m1
Expand Down Expand Up @@ -879,6 +882,7 @@ QUERY PLAN
-> Seq Scan on compress_hyper_X_X_chunk compress_hyper_X_X_chunk_1
(10 rows)

RESET enable_mergejoin;
RESET parallel_leader_participation;
:PREFIX
SELECT *
Expand Down
4 changes: 4 additions & 0 deletions tsl/test/shared/expected/transparent_decompress_chunk-17.out
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,9 @@ QUERY PLAN

-- test OUTER JOIN
SET min_parallel_table_scan_size TO '0';
-- Disable merge join to get stable tests. These queries uses hash
-- joins.
SET enable_mergejoin TO off;
:PREFIX_NO_VERBOSE
SELECT *
FROM :TEST_TABLE m1
Expand Down Expand Up @@ -879,6 +882,7 @@ QUERY PLAN
-> Seq Scan on compress_hyper_X_X_chunk compress_hyper_X_X_chunk_1
(10 rows)

RESET enable_mergejoin;
RESET parallel_leader_participation;
:PREFIX
SELECT *
Expand Down
4 changes: 4 additions & 0 deletions tsl/test/shared/sql/transparent_decompress_chunk.sql.in
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ FROM metrics m1

-- test OUTER JOIN
SET min_parallel_table_scan_size TO '0';
-- Disable merge join to get stable tests. These queries uses hash
-- joins.
SET enable_mergejoin TO off;
:PREFIX_NO_VERBOSE
SELECT *
FROM :TEST_TABLE m1
Expand Down Expand Up @@ -288,6 +291,7 @@ ORDER BY m1.time,
m1.device_id,
m2.device_id
LIMIT 10;
RESET enable_mergejoin;
RESET parallel_leader_participation;

:PREFIX
Expand Down

0 comments on commit d29ccee

Please sign in to comment.