2017-04-01 09:19:00 +00:00
|
|
|
#include <Functions/FunctionFactory.h>
|
|
|
|
#include <Functions/FunctionsRandom.h>
|
2014-08-22 00:57:20 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2017-07-25 17:00:38 +00:00
|
|
|
namespace detail
|
|
|
|
{
|
|
|
|
void seed(LinearCongruentialGenerator & generator, intptr_t additional_seed)
|
|
|
|
{
|
|
|
|
generator.seed(intHash64(randomSeed() ^ intHash64(additional_seed)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-22 00:57:20 +00:00
|
|
|
void registerFunctionsRandom(FunctionFactory & factory)
|
|
|
|
{
|
2017-04-01 07:20:54 +00:00
|
|
|
factory.registerFunction<FunctionRand>();
|
|
|
|
factory.registerFunction<FunctionRand64>();
|
|
|
|
factory.registerFunction<FunctionRandConstant>();
|
2014-08-22 00:57:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|