mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-16 02:23:49 +08:00
Fix tests to be resilient to possible PG planner changes.
This commit is contained in:
parent
42f197e579
commit
1fbd4116f9
@ -669,7 +669,7 @@ ORDER BY c.id;
|
||||
\set QUERY1 'SELECT show_chunks(\'drop_chunk_test1\', newer_than=>5)::NAME'
|
||||
\set QUERY2 'SELECT drop_chunks(\'drop_chunk_test1\', newer_than=>5, verbose => true)::NAME'
|
||||
\set ECHO errors
|
||||
psql:include/query_result_test_equal.sql:14: INFO: dropping chunk _timescaledb_internal._hyper_1_5_chunk
|
||||
psql:include/query_result_test_equal.sql:16: INFO: dropping chunk _timescaledb_internal._hyper_1_5_chunk
|
||||
Different Rows | Total Rows from Query 1 | Total Rows from Query 2
|
||||
----------------+-------------------------+-------------------------
|
||||
0 | 1 | 1
|
||||
|
@ -3,6 +3,8 @@
|
||||
-- LICENSE-APACHE for a copy of the license.
|
||||
|
||||
--expects QUERY1 and QUERY2 to be set, expects data can be compared
|
||||
set enable_hashjoin = off;
|
||||
set enable_mergejoin = on;
|
||||
with query1 AS (
|
||||
SELECT row_number() OVER(ORDER BY q.*) row_number, * FROM (:QUERY1) as q
|
||||
),
|
||||
@ -12,3 +14,5 @@ query2 AS (
|
||||
SELECT count(*) FILTER (WHERE query1.row_number IS DISTINCT FROM query2.row_number OR query1.show_chunks IS DISTINCT FROM query2.drop_chunks) AS "Different Rows",
|
||||
coalesce(max(query1.row_number), 0) AS "Total Rows from Query 1", coalesce(max(query2.row_number), 0) AS "Total Rows from Query 2"
|
||||
FROM query1 FULL OUTER JOIN query2 ON (query1.row_number = query2.row_number);
|
||||
reset enable_hashjoin;
|
||||
reset enable_mergejoin;
|
||||
|
Loading…
x
Reference in New Issue
Block a user