mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Added test [#CLICKHOUSE-2]
This commit is contained in:
parent
f2a65f222a
commit
ba4a07c739
@ -0,0 +1,4 @@
|
||||
1 11 91 81 123456
|
||||
2 22 92 82 123457
|
||||
1 11 91 81 123456
|
||||
2 22 92 82 123457
|
40
dbms/tests/queries/0_stateless/00561_storage_join.sql
Normal file
40
dbms/tests/queries/0_stateless/00561_storage_join.sql
Normal file
@ -0,0 +1,40 @@
|
||||
drop table IF EXISTS test.joinbug;
|
||||
|
||||
CREATE TABLE test.joinbug (
|
||||
event_date Date MATERIALIZED toDate(created, 'Europe/Moscow'),
|
||||
id UInt64,
|
||||
id2 UInt64,
|
||||
val UInt64,
|
||||
val2 Int32,
|
||||
created UInt64
|
||||
) ENGINE = MergeTree(event_date, (id, id2), 8192);
|
||||
|
||||
insert into test.joinbug (id, id2, val, val2, created) values (1,11,91,81,123456), (2,22,92,82,123457);
|
||||
|
||||
drop table IF EXISTS test.joinbug_join;
|
||||
|
||||
CREATE TABLE test.joinbug_join (
|
||||
id UInt64,
|
||||
id2 UInt64,
|
||||
val UInt64,
|
||||
val2 Int32,
|
||||
created UInt64
|
||||
) ENGINE = Join(ANY, INNER, id2);
|
||||
|
||||
insert into test.joinbug_join (id, id2, val, val2, created)
|
||||
select id, id2, val, val2, created
|
||||
from test.joinbug;
|
||||
|
||||
/* expected */
|
||||
select *
|
||||
from test.joinbug;
|
||||
|
||||
/* wtf */
|
||||
select id, id2, val, val2, created
|
||||
from (
|
||||
SELECT toUInt64(arrayJoin(range(50))) AS id2
|
||||
)
|
||||
ANY INNER JOIN test.joinbug_join using id2;
|
||||
|
||||
DROP TABLE test.joinbug;
|
||||
DROP TABLE test.joinbug_join;
|
Loading…
Reference in New Issue
Block a user