mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
added test [#CLICKHOUSE-3680]
This commit is contained in:
parent
33774e93fa
commit
f7b39b8df2
13
dbms/tests/queries/0_stateless/00612_pk_in_tuple.reference
Normal file
13
dbms/tests/queries/0_stateless/00612_pk_in_tuple.reference
Normal file
@ -0,0 +1,13 @@
|
||||
all
|
||||
1 [1]
|
||||
2 [2]
|
||||
key, arrayJoin(arr) in (1, 1)
|
||||
1 1
|
||||
key, arrayJoin(arr) in ((1, 1), (2, 2))
|
||||
1 1
|
||||
2 2
|
||||
(key, left array join arr) in (1, 1)
|
||||
1
|
||||
(key, left array join arr) in ((1, 1), (2, 2))
|
||||
1
|
||||
2
|
16
dbms/tests/queries/0_stateless/00612_pk_in_tuple.sql
Normal file
16
dbms/tests/queries/0_stateless/00612_pk_in_tuple.sql
Normal file
@ -0,0 +1,16 @@
|
||||
create database if not exists test;
|
||||
drop table if exists test.tab;
|
||||
create table test.tab (key UInt64, arr Array(UInt64)) Engine = MergeTree order by key;
|
||||
insert into test.tab values (1, [1]);
|
||||
insert into test.tab values (2, [2]);
|
||||
select 'all';
|
||||
select * from test.tab order by key;
|
||||
select 'key, arrayJoin(arr) in (1, 1)';
|
||||
select key, arrayJoin(arr) as val from test.tab where (key, val) in (1, 1);
|
||||
select 'key, arrayJoin(arr) in ((1, 1), (2, 2))';
|
||||
select key, arrayJoin(arr) as val from test.tab where (key, val) in ((1, 1), (2, 2)) order by key;
|
||||
select '(key, left array join arr) in (1, 1)';
|
||||
select key from test.tab left array join arr as val where (key, val) in (1, 1);
|
||||
select '(key, left array join arr) in ((1, 1), (2, 2))';
|
||||
select key from test.tab left array join arr as val where (key, val) in ((1, 1), (2, 2)) order by key;
|
||||
|
Loading…
Reference in New Issue
Block a user