mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Added tests
This commit is contained in:
parent
b6f3b81403
commit
3aed5a4ab4
@ -0,0 +1,33 @@
|
||||
Expression ((Project names + (Projection + )))
|
||||
Header: t1.id UInt64
|
||||
t1.value String
|
||||
t2.value String
|
||||
Actions: INPUT : 0 -> t1.id_0 UInt64 : 0
|
||||
INPUT : 1 -> t1.value_1 String : 1
|
||||
INPUT : 2 -> t2.value_2 String : 2
|
||||
ALIAS t1.id_0 :: 0 -> t1.id UInt64 : 3
|
||||
ALIAS t1.value_1 :: 1 -> t1.value String : 0
|
||||
ALIAS t2.value_2 :: 2 -> t2.value String : 1
|
||||
Positions: 3 0 1
|
||||
FilledJoin (Filled JOIN)
|
||||
Header: t1.id_0 UInt64
|
||||
t1.value_1 String
|
||||
t2.value_2 String
|
||||
Filter (( + (JOIN actions + Change column names to column identifiers)))
|
||||
Header: t1.id_0 UInt64
|
||||
t1.value_1 String
|
||||
Filter column: equals(t1.id_0, 0_UInt8) (removed)
|
||||
Actions: INPUT : 0 -> id UInt64 : 0
|
||||
INPUT : 1 -> value String : 1
|
||||
COLUMN Const(UInt8) -> 0_UInt8 UInt8 : 2
|
||||
ALIAS id :: 0 -> t1.id_0 UInt64 : 3
|
||||
ALIAS value :: 1 -> t1.value_1 String : 0
|
||||
FUNCTION equals(t1.id_0 : 3, 0_UInt8 :: 2) -> equals(t1.id_0, 0_UInt8) UInt8 : 1
|
||||
Positions: 1 3 0
|
||||
ReadFromMergeTree (default.test_table)
|
||||
Header: id UInt64
|
||||
value String
|
||||
ReadType: Default
|
||||
Parts: 1
|
||||
Granules: 1
|
||||
0 Value JoinValue
|
@ -0,0 +1,26 @@
|
||||
SET allow_experimental_analyzer = 1;
|
||||
|
||||
DROP TABLE IF EXISTS test_table;
|
||||
CREATE TABLE test_table
|
||||
(
|
||||
id UInt64,
|
||||
value String
|
||||
) ENGINE=MergeTree ORDER BY id;
|
||||
|
||||
INSERT INTO test_table VALUES (0, 'Value');
|
||||
|
||||
DROP TABLE IF EXISTS test_table_join;
|
||||
CREATE TABLE test_table_join
|
||||
(
|
||||
id UInt64,
|
||||
value String
|
||||
) ENGINE = Join(All, inner, id);
|
||||
|
||||
INSERT INTO test_table_join VALUES (0, 'JoinValue');
|
||||
|
||||
EXPLAIN header = 1, actions = 1 SELECT t1.id, t1.value, t2.value FROM test_table AS t1 INNER JOIN test_table_join AS t2 ON t1.id = t2.id WHERE t1.id = 0;
|
||||
|
||||
SELECT t1.id, t1.value, t2.value FROM test_table AS t1 INNER JOIN test_table_join AS t2 ON t1.id = t2.id WHERE t1.id = 0;
|
||||
|
||||
DROP TABLE test_table_join;
|
||||
DROP TABLE test_table;
|
Loading…
Reference in New Issue
Block a user