Add value materialization test (#5368)

pull/5369/head
Önder Kalacı 2021-10-13 09:08:24 +02:00 committed by GitHub
parent a39859bc74
commit af876bf452
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 0 deletions

View File

@ -290,6 +290,7 @@ class CitusUnusualQuerySettingsConfig(CitusMXBaseClusterConfig):
"citus.enable_single_hash_repartition_joins": True, "citus.enable_single_hash_repartition_joins": True,
"citus.recover_2pc_interval": "1s", "citus.recover_2pc_interval": "1s",
"citus.remote_task_check_interval": "1ms", "citus.remote_task_check_interval": "1ms",
"citus.values_materialization_threshold" : "0"
} }

View File

@ -452,6 +452,18 @@ SELECT count(*) from local;
(1 row) (1 row)
ROLLBACK; ROLLBACK;
-- values materialization test
WITH cte_1 (num,letter) AS (VALUES (1, 'one'), (2, 'two'), (3, 'three'))
SELECT
count(*)
FROM
test
WHERE x IN (SELECT num FROM cte_1);
count
---------------------------------------------------------------------
3
(1 row)
-- query fails on the shards should be handled -- query fails on the shards should be handled
-- nicely -- nicely
\set VERBOSITY terse \set VERBOSITY terse

View File

@ -237,6 +237,14 @@ INSERT INTO local(c, d) SELECT a, b FROM ref;
SELECT count(*) from local; SELECT count(*) from local;
ROLLBACK; ROLLBACK;
-- values materialization test
WITH cte_1 (num,letter) AS (VALUES (1, 'one'), (2, 'two'), (3, 'three'))
SELECT
count(*)
FROM
test
WHERE x IN (SELECT num FROM cte_1);
-- query fails on the shards should be handled -- query fails on the shards should be handled
-- nicely -- nicely
\set VERBOSITY terse \set VERBOSITY terse