diff --git a/src/test/regress/citus_tests/config.py b/src/test/regress/citus_tests/config.py index 7d30cffdf..f9d409ba8 100644 --- a/src/test/regress/citus_tests/config.py +++ b/src/test/regress/citus_tests/config.py @@ -290,6 +290,7 @@ class CitusUnusualQuerySettingsConfig(CitusMXBaseClusterConfig): "citus.enable_single_hash_repartition_joins": True, "citus.recover_2pc_interval": "1s", "citus.remote_task_check_interval": "1ms", + "citus.values_materialization_threshold" : "0" } diff --git a/src/test/regress/expected/distributed_planning.out b/src/test/regress/expected/distributed_planning.out index 30101ca96..a659ffc44 100644 --- a/src/test/regress/expected/distributed_planning.out +++ b/src/test/regress/expected/distributed_planning.out @@ -452,6 +452,18 @@ SELECT count(*) from local; (1 row) 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 -- nicely \set VERBOSITY terse diff --git a/src/test/regress/sql/distributed_planning.sql b/src/test/regress/sql/distributed_planning.sql index 329a9e9db..346852c01 100644 --- a/src/test/regress/sql/distributed_planning.sql +++ b/src/test/regress/sql/distributed_planning.sql @@ -237,6 +237,14 @@ INSERT INTO local(c, d) SELECT a, b FROM ref; SELECT count(*) from local; 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 -- nicely \set VERBOSITY terse