mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-18 04:12:19 +00:00
Added test.
This commit is contained in:
parent
4bb0bd16e1
commit
39de699790
@ -0,0 +1,18 @@
|
|||||||
|
0
|
||||||
|
1
|
||||||
|
\N
|
||||||
|
\N
|
||||||
|
2
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
0
|
||||||
|
1
|
||||||
|
2
|
||||||
|
\N
|
||||||
|
\N
|
||||||
|
\N
|
||||||
|
1
|
||||||
|
0
|
||||||
|
1
|
||||||
|
2
|
23
tests/queries/0_stateless/01653_tuple_hamming_distance_2.sql
Normal file
23
tests/queries/0_stateless/01653_tuple_hamming_distance_2.sql
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
SELECT tupleHammingDistance(tuple(1), tuple(1));
|
||||||
|
SELECT tupleHammingDistance(tuple(1), tuple(2));
|
||||||
|
SELECT tupleHammingDistance(tuple(1), tuple(Null));
|
||||||
|
SELECT tupleHammingDistance(tuple(Null), tuple(Null));
|
||||||
|
SELECT tupleHammingDistance((1, 2), (3, 4));
|
||||||
|
SELECT tupleHammingDistance((1, 2), (1, 4));
|
||||||
|
SELECT tupleHammingDistance(materialize((1, 2)), (1, 4));
|
||||||
|
SELECT tupleHammingDistance(materialize((1, 2)),materialize ((1, 4)));
|
||||||
|
SELECT tupleHammingDistance((1, 2), (1, 2));
|
||||||
|
SELECT tupleHammingDistance((1, 2), (1, 257));
|
||||||
|
SELECT tupleHammingDistance((1, 2, 3), (1, 257, 65537));
|
||||||
|
SELECT tupleHammingDistance((1, 2), (1, Null));
|
||||||
|
SELECT tupleHammingDistance((1, Null), (1, Null));
|
||||||
|
SELECT tupleHammingDistance((Null, Null), (Null, Null));
|
||||||
|
SELECT tupleHammingDistance(('abc', 2), ('abc', 257));
|
||||||
|
SELECT tupleHammingDistance(('abc', (1, 2)), ('abc', (1, 2)));
|
||||||
|
SELECT tupleHammingDistance(('abc', (1, 2)), ('def', (1, 2)));
|
||||||
|
SELECT tupleHammingDistance(('abc', (1, 2)), ('def', (1, 3)));
|
||||||
|
|
||||||
|
|
||||||
|
SELECT tupleHammingDistance(tuple(1), tuple(1, 1)); --{serverError 43}
|
||||||
|
SELECT tupleHammingDistance(tuple(1), tuple('a')); --{serverError 386}
|
||||||
|
SELECT tupleHammingDistance((1, 3), (3, 'a')); --{serverError 386}
|
Loading…
Reference in New Issue
Block a user