From b6057bd83c89ba12ce83d530cb2d05836423703b Mon Sep 17 00:00:00 2001 From: Igor Nikonov Date: Mon, 25 Mar 2024 20:34:24 +0000 Subject: [PATCH] Test: tuple elimination with analyzer --- .../03031_tuple_elimination_analyzer.reference | 1 + .../0_stateless/03031_tuple_elimination_analyzer.sql | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 tests/queries/0_stateless/03031_tuple_elimination_analyzer.reference create mode 100644 tests/queries/0_stateless/03031_tuple_elimination_analyzer.sql diff --git a/tests/queries/0_stateless/03031_tuple_elimination_analyzer.reference b/tests/queries/0_stateless/03031_tuple_elimination_analyzer.reference new file mode 100644 index 00000000000..84ab67a85e0 --- /dev/null +++ b/tests/queries/0_stateless/03031_tuple_elimination_analyzer.reference @@ -0,0 +1 @@ +(0) diff --git a/tests/queries/0_stateless/03031_tuple_elimination_analyzer.sql b/tests/queries/0_stateless/03031_tuple_elimination_analyzer.sql new file mode 100644 index 00000000000..97a19cda7d3 --- /dev/null +++ b/tests/queries/0_stateless/03031_tuple_elimination_analyzer.sql @@ -0,0 +1,9 @@ +DROP TABLE IF EXISTS test; + +SET allow_suspicious_low_cardinality_types = true, allow_experimental_analyzer = true; + +CREATE TABLE test (`id` LowCardinality(UInt32)) ENGINE = MergeTree ORDER BY id AS SELECT 0; + +SELECT tuple(tuple(id) = tuple(1048576)) FROM test; + +DROP TABLE test;