Non-deterministic TABLESAMPLE projections get deduplicated
Author: findepiCreated Sep 16, 2026Updated Sep 16, 2026
This is a non-deterministic query returning usually between 5 and 20
SELECT count(*) FROM tpch.tiny.nation TABLESAMPLE BERNOULLI(50)therefore this usually return 3 different numbers
SELECT
(SELECT count(*) FROM tpch.tiny.nation TABLESAMPLE BERNOULLI(50)),
(SELECT count(*) FROM tpch.tiny.nation TABLESAMPLE BERNOULLI(50)),
(SELECT count(*) FROM tpch.tiny.nation TABLESAMPLE BERNOULLI(50))currently this always returns 3 same numbers
Source: trinodb/trino