mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
added tests for hasAll and hasAny [#CLICKHOUSE-3504]
This commit is contained in:
parent
8ceb85bcca
commit
f0f6343a39
45
dbms/tests/queries/0_stateless/00555_hasAll_hasAny.reference
Normal file
45
dbms/tests/queries/0_stateless/00555_hasAll_hasAny.reference
Normal file
@ -0,0 +1,45 @@
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
1
|
||||
0
|
||||
1
|
||||
-
|
||||
0
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
-
|
||||
1
|
||||
0
|
||||
-
|
||||
0
|
||||
1
|
||||
1
|
||||
1
|
||||
0
|
||||
1
|
||||
0
|
||||
1
|
||||
0
|
||||
-
|
||||
1
|
||||
1
|
||||
1
|
||||
0
|
||||
-
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
-
|
||||
0
|
||||
1
|
||||
1
|
||||
0
|
52
dbms/tests/queries/0_stateless/00555_hasAll_hasAny.sql
Normal file
52
dbms/tests/queries/0_stateless/00555_hasAll_hasAny.sql
Normal file
@ -0,0 +1,52 @@
|
||||
select hasAll([], []);
|
||||
select hasAll([], [1]);
|
||||
select hasAll([], [NULL]);
|
||||
select hasAll([Null], [Null]);
|
||||
select hasAll([Null], [Null, 1]);
|
||||
select hasAll([1], []);
|
||||
select hasAll([1], [Null]);
|
||||
select hasAll([1, Null], [Null]);
|
||||
select '-';
|
||||
|
||||
select hasAny([], []);
|
||||
select hasAny([], [1]);
|
||||
select hasAny([], [NULL]);
|
||||
select hasAny([Null], [Null]);
|
||||
select hasAny([Null], [Null, 1]);
|
||||
select hasAny([1], []);
|
||||
select hasAny([1], [Null]);
|
||||
select hasAny([1, Null], [Null]);
|
||||
select '-';
|
||||
|
||||
select hasAll([1], emptyArrayUInt8());
|
||||
select hasAny([1], emptyArrayUInt8());
|
||||
select '-';
|
||||
|
||||
select hasAny([1, 2, 3, 4], [5, 6]);
|
||||
select hasAny([1, 2, 3, 4], [1, 3, 5]);
|
||||
select hasAny([1, 2, 3, 4], [1, 3]);
|
||||
select hasAll([1, 2, 3, 4], [1, 3]);
|
||||
select hasAll([1, 2, 3, 4], [1, 3, 5]);
|
||||
select hasAny([-128, 1., 512], [1.]);
|
||||
select hasAny([-128, 1.0, 512], [.3]);
|
||||
select hasAll([-128, 1.0, 512], [1.0]);
|
||||
select hasAll([-128, 1.0, 512], [1.0, 513]);
|
||||
select '-';
|
||||
|
||||
select hasAny(['a'], ['a']);
|
||||
select hasAll(['a'], ['a']);
|
||||
select hasAny(['a', 'b'], ['a', 'c']);
|
||||
select hasAll(['a', 'b'], ['a', 'c']);
|
||||
select '-';
|
||||
|
||||
select hasAny([1], ['a']);
|
||||
select hasAll([1], ['a']);
|
||||
select hasAll([[1, 2], [3, 4]], ['a', 'c']);
|
||||
select hasAny([[1, 2], [3, 4]], ['a', 'c']);
|
||||
select '-';
|
||||
|
||||
select hasAll([[1, 2], [3, 4]], [[1, 2], [3, 5]]);
|
||||
select hasAll([[1, 2], [3, 4]], [[1, 2], [1, 2]]);
|
||||
select hasAny([[1, 2], [3, 4]], [[1, 2], [3, 5]]);
|
||||
select hasAny([[1, 2], [3, 4]], [[1, 3], [4, 2]]);
|
||||
|
Loading…
Reference in New Issue
Block a user