2014-08-22 00:57:20 +00:00
|
|
|
#include <DB/Functions/FunctionFactory.h>
|
|
|
|
#include <DB/Functions/FunctionsHashing.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
void registerFunctionsHashing(FunctionFactory & factory)
|
|
|
|
{
|
2017-04-01 07:20:54 +00:00
|
|
|
factory.registerFunction<FunctionHalfMD5>();
|
|
|
|
factory.registerFunction<FunctionMD5>();
|
|
|
|
factory.registerFunction<FunctionSHA1>();
|
|
|
|
factory.registerFunction<FunctionSHA224>();
|
|
|
|
factory.registerFunction<FunctionSHA256>();
|
|
|
|
factory.registerFunction<FunctionSipHash64>();
|
|
|
|
factory.registerFunction<FunctionSipHash128>();
|
|
|
|
factory.registerFunction<FunctionCityHash64>();
|
|
|
|
factory.registerFunction<FunctionFarmHash64>();
|
|
|
|
factory.registerFunction<FunctionMetroHash64>();
|
|
|
|
factory.registerFunction<FunctionIntHash32>();
|
|
|
|
factory.registerFunction<FunctionIntHash64>();
|
|
|
|
factory.registerFunction<FunctionURLHash>();
|
2014-08-22 00:57:20 +00:00
|
|
|
}
|
|
|
|
|
2016-05-24 19:01:17 +00:00
|
|
|
template <>
|
|
|
|
UInt64 toInteger<Float32>(Float32 x)
|
|
|
|
{
|
2017-04-01 07:20:54 +00:00
|
|
|
UInt32 res;
|
|
|
|
memcpy(&res, &x, sizeof(x));
|
|
|
|
return res;
|
2016-05-24 19:01:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
UInt64 toInteger<Float64>(Float64 x)
|
|
|
|
{
|
2017-04-01 07:20:54 +00:00
|
|
|
UInt64 res;
|
|
|
|
memcpy(&res, &x, sizeof(x));
|
|
|
|
return res;
|
2016-05-24 19:01:17 +00:00
|
|
|
}
|
|
|
|
|
2014-08-22 00:57:20 +00:00
|
|
|
}
|