ClickHouse/tests/queries/0_stateless/00821_distributed_storage_with_join_on.sql
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

13 lines
672 B
SQL

DROP TABLE IF EXISTS table1;
DROP TABLE IF EXISTS table2;
CREATE TABLE table1 AS system.columns ENGINE = Distributed('test_shard_localhost', system, columns);
CREATE TABLE table2 AS system.tables ENGINE = Distributed('test_shard_localhost', system, tables);
SELECT 1 FROM table1 T1 ALL INNER JOIN table2 T2 ON T1.table = T2.name LIMIT 1;
SELECT 1 FROM cluster('test_shard_localhost', system.columns) T1 ALL INNER JOIN cluster('test_shard_localhost', system.tables) T2 ON T1.table = T2.name LIMIT 1;
SELECT 1 FROM (SELECT * FROM table1) T1 ALL INNER JOIN (SELECT * FROM table2) T2 ON T1.table = T2.name LIMIT 1;
DROP TABLE IF EXISTS table1;
DROP TABLE IF EXISTS table2;