mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
more tests for joins
This commit is contained in:
parent
6393c24109
commit
6bbbd8721c
@ -1,6 +1,18 @@
|
||||
┌─database─┬─name─┐
|
||||
│ system │ one │
|
||||
└──────────┴──────┘
|
||||
┌─database─┬─name─┐
|
||||
│ system │ one │
|
||||
└──────────┴──────┘
|
||||
┌─database─┬─name─┐
|
||||
│ system │ one │
|
||||
└──────────┴──────┘
|
||||
┌─x──────┬─name─┐
|
||||
│ system │ one │
|
||||
└────────┴──────┘
|
||||
┌─database─┬─name─┐
|
||||
│ system │ one │
|
||||
└──────────┴──────┘
|
||||
┌─x──────┬─name─┐
|
||||
│ system │ one │
|
||||
└────────┴──────┘
|
||||
|
@ -2,12 +2,37 @@ CREATE DATABASE IF NOT EXISTS test;
|
||||
DROP TABLE IF EXISTS test.one;
|
||||
CREATE TABLE test.one(dummy UInt8) ENGINE = Memory;
|
||||
|
||||
SELECT database, t.name
|
||||
FROM system.tables AS t
|
||||
ALL INNER JOIN (SELECT name AS database FROM system.databases) AS db USING database
|
||||
WHERE database = 'system' AND t.name = 'one'
|
||||
FORMAT PrettyCompactNoEscapes;
|
||||
|
||||
SELECT database, t.name
|
||||
FROM (SELECT name AS database FROM system.databases) AS db
|
||||
ALL INNER JOIN system.tables AS t USING database
|
||||
WHERE database = 'system' AND t.name = 'one'
|
||||
FORMAT PrettyCompactNoEscapes;
|
||||
|
||||
SELECT database, t.name
|
||||
FROM (SELECT name, database FROM system.tables) AS t
|
||||
ALL INNER JOIN (SELECT name AS database FROM system.databases) AS db USING database
|
||||
WHERE database = 'system' AND t.name = 'one'
|
||||
FORMAT PrettyCompactNoEscapes;
|
||||
|
||||
SELECT x, t.name
|
||||
FROM (SELECT name, database AS x FROM system.tables) AS t
|
||||
ALL INNER JOIN (SELECT name AS x FROM system.databases) AS db USING x
|
||||
WHERE x = 'system' AND t.name = 'one'
|
||||
FORMAT PrettyCompactNoEscapes;
|
||||
|
||||
SELECT database, t.name
|
||||
FROM (SELECT name, database FROM system.tables) AS t
|
||||
JOIN (SELECT name AS database FROM system.databases) AS db USING database
|
||||
WHERE database = 'system' AND t.name = 'one'
|
||||
SETTINGS join_default_strictness = 'ALL'
|
||||
FORMAT PrettyCompactNoEscapes;
|
||||
|
||||
SELECT x, t.name
|
||||
FROM (SELECT name, database AS x FROM system.tables) AS t
|
||||
JOIN (SELECT name AS x FROM system.databases) AS db USING x
|
||||
|
Loading…
Reference in New Issue
Block a user