diff --git a/tests/queries/0_stateless/01907_multiple_aliases.reference b/tests/queries/0_stateless/01907_multiple_aliases.reference new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/tests/queries/0_stateless/01907_multiple_aliases.reference @@ -0,0 +1 @@ +1 diff --git a/tests/queries/0_stateless/01907_multiple_aliases.sql b/tests/queries/0_stateless/01907_multiple_aliases.sql new file mode 100644 index 00000000000..611960a5205 --- /dev/null +++ b/tests/queries/0_stateless/01907_multiple_aliases.sql @@ -0,0 +1,11 @@ +DROP TABLE IF EXISTS t; +CREATE TABLE t (d Date, z UInt32) ENGINE = MergeTree(d, (z), 1); + +INSERT INTO t VALUES ('2017-01-01', 1); + +WITH (d < '2018-01-01') AND (d < '2018-01-02') AS x +SELECT 1 +FROM t +WHERE x; + +DROP TABLE t;