diff --git a/tests/queries/0_stateless/02955_analyzer_using_functional_args.reference b/tests/queries/0_stateless/02955_analyzer_using_functional_args.reference new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/tests/queries/0_stateless/02955_analyzer_using_functional_args.reference @@ -0,0 +1 @@ +1 diff --git a/tests/queries/0_stateless/02955_analyzer_using_functional_args.sql b/tests/queries/0_stateless/02955_analyzer_using_functional_args.sql new file mode 100644 index 00000000000..e4c1fd86b09 --- /dev/null +++ b/tests/queries/0_stateless/02955_analyzer_using_functional_args.sql @@ -0,0 +1,11 @@ +CREATE TABLE t1 (x Int16, y ALIAS x + x * 2) ENGINE=MergeTree() ORDER BY x; +CREATE TABLE t2 (y Int16, z Int16) ENGINE=MergeTree() ORDER BY y; + +INSERT INTO t1 VALUES (1231), (123); +INSERT INTO t2 VALUES (6666, 48); +INSERT INTO t2 VALUES (369, 50); + +SELECT count() FROM t1 INNER JOIN t2 USING (y); + +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2;