Add a test for alias in USING clause

This commit is contained in:
Dmitry Novik 2023-12-28 16:59:57 +00:00
parent d58b76ce06
commit 0faf784d2f
2 changed files with 12 additions and 0 deletions

View File

@ -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;