mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
rename to gccMurmurHash
This commit is contained in:
parent
e6c02a2356
commit
31a516300a
@ -28,7 +28,7 @@ void registerFunctionsHashing(FunctionFactory & factory)
|
||||
factory.registerFunction<FunctionMurmurHash3_32>();
|
||||
factory.registerFunction<FunctionMurmurHash3_64>();
|
||||
factory.registerFunction<FunctionMurmurHash3_128>();
|
||||
factory.registerFunction<FunctionGccHash>();
|
||||
factory.registerFunction<FunctionGccMurmurHash>();
|
||||
|
||||
#if USE_XXHASH
|
||||
factory.registerFunction<FunctionXxHash32>();
|
||||
|
@ -258,9 +258,9 @@ struct MurmurHash2Impl64
|
||||
};
|
||||
|
||||
/// To be compatible with gcc: https://github.com/gcc-mirror/gcc/blob/41d6b10e96a1de98e90a7c0378437c3255814b16/libstdc%2B%2B-v3/include/bits/functional_hash.h#L191
|
||||
struct GccHashImpl
|
||||
struct GccMurmurHashImpl
|
||||
{
|
||||
static constexpr auto name = "gccHash";
|
||||
static constexpr auto name = "gccMurmurHash";
|
||||
using ReturnType = UInt64;
|
||||
|
||||
static UInt64 apply(const char * data, const size_t size)
|
||||
@ -1089,7 +1089,7 @@ using FunctionFarmHash64 = FunctionAnyHash<ImplFarmHash64>;
|
||||
using FunctionMetroHash64 = FunctionAnyHash<ImplMetroHash64>;
|
||||
using FunctionMurmurHash2_32 = FunctionAnyHash<MurmurHash2Impl32>;
|
||||
using FunctionMurmurHash2_64 = FunctionAnyHash<MurmurHash2Impl64>;
|
||||
using FunctionGccHash = FunctionAnyHash<GccHashImpl>;
|
||||
using FunctionGccMurmurHash = FunctionAnyHash<GccMurmurHashImpl>;
|
||||
using FunctionMurmurHash3_32 = FunctionAnyHash<MurmurHash3Impl32>;
|
||||
using FunctionMurmurHash3_64 = FunctionAnyHash<MurmurHash3Impl64>;
|
||||
using FunctionMurmurHash3_128 = FunctionStringHashFixedString<MurmurHash3Impl128>;
|
||||
|
@ -28,9 +28,9 @@ SELECT murmurHash3_64('foo');
|
||||
SELECT murmurHash3_64('\x01');
|
||||
SELECT murmurHash3_64(1);
|
||||
|
||||
SELECT gccHash('foo');
|
||||
SELECT gccHash('\x01');
|
||||
SELECT gccHash(1);
|
||||
SELECT gccMurmurHash('foo');
|
||||
SELECT gccMurmurHash('\x01');
|
||||
SELECT gccMurmurHash(1);
|
||||
|
||||
SELECT hex(murmurHash3_128('foo'));
|
||||
SELECT hex(murmurHash3_128('\x01'));
|
||||
|
@ -18,6 +18,6 @@ SELECT murmurHash3_64(1, 2, 3);
|
||||
SELECT murmurHash3_64(1, 3, 2);
|
||||
SELECT murmurHash3_64(('a', [1, 2, 3], 4, (4, ['foo', 'bar'], 1, (1, 2))));
|
||||
|
||||
SELECT gccHash(1, 2, 3);
|
||||
SELECT gccHash(1, 3, 2);
|
||||
SELECT gccHash(('a', [1, 2, 3], 4, (4, ['foo', 'bar'], 1, (1, 2))));
|
||||
SELECT gccMurmurHash(1, 2, 3);
|
||||
SELECT gccMurmurHash(1, 3, 2);
|
||||
SELECT gccMurmurHash(('a', [1, 2, 3], 4, (4, ['foo', 'bar'], 1, (1, 2))));
|
Loading…
Reference in New Issue
Block a user