mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
add tests
This commit is contained in:
parent
2d41b958a3
commit
58fe7b3cfc
24
dbms/tests/queries/0_stateless/00678_murmurhash.reference
Normal file
24
dbms/tests/queries/0_stateless/00678_murmurhash.reference
Normal file
@ -0,0 +1,24 @@
|
||||
623211862
|
||||
3533626746
|
||||
2388617433
|
||||
2708309598
|
||||
2414502773
|
||||
670491991
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
14834356025302342401
|
||||
12725806677685968135
|
||||
12725806677685968135
|
||||
4138058784
|
||||
3831157163
|
||||
3831157163
|
||||
13734972179185502238
|
||||
8919398411357508216
|
||||
8919398411357508216
|
29
dbms/tests/queries/0_stateless/00678_murmurhash.sql
Normal file
29
dbms/tests/queries/0_stateless/00678_murmurhash.sql
Normal file
@ -0,0 +1,29 @@
|
||||
SELECT murmurHash2_32(123456);
|
||||
SELECT murmurHash2_32(CAST(3 AS UInt8));
|
||||
SELECT murmurHash2_32(CAST(1.2684 AS Float32));
|
||||
SELECT murmurHash2_32(CAST(-154477 AS Int64));
|
||||
SELECT murmurHash2_32('foo');
|
||||
SELECT murmurHash2_32(CAST('bar' AS FixedString(3)));
|
||||
SELECT murmurHash2_32(x) FROM (SELECT CAST(1 AS Enum8('a' = 1, 'b' = 2)) as x);
|
||||
|
||||
SELECT murmurHash2_32('');
|
||||
SELECT murmurHash2_32('\x01');
|
||||
SELECT murmurHash2_32('\x02\0');
|
||||
SELECT murmurHash2_32('\x03\0\0');
|
||||
SELECT murmurHash2_32(1);
|
||||
SELECT murmurHash2_32(toUInt16(2));
|
||||
|
||||
SELECT murmurHash2_32(2) = bitXor(toUInt32(0x5bd1e995 * bitXor(toUInt32(3 * 0x5bd1e995) AS a, bitShiftRight(a, 13))) AS b, bitShiftRight(b, 15));
|
||||
SELECT murmurHash2_32('\x02') = bitXor(toUInt32(0x5bd1e995 * bitXor(toUInt32(3 * 0x5bd1e995) AS a, bitShiftRight(a, 13))) AS b, bitShiftRight(b, 15));
|
||||
|
||||
SELECT murmurHash2_64('foo');
|
||||
SELECT murmurHash2_64('\x01');
|
||||
SELECT murmurHash2_64(1);
|
||||
|
||||
SELECT murmurHash3_32('foo');
|
||||
SELECT murmurHash3_32('\x01');
|
||||
SELECT murmurHash3_32(1);
|
||||
|
||||
SELECT murmurHash3_64('foo');
|
||||
SELECT murmurHash3_64('\x01');
|
||||
SELECT murmurHash3_64(1);
|
Loading…
Reference in New Issue
Block a user