mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-19 06:01:57 +00:00
03bbe9938a
* Fix compilation error when include FunctionsRandom.h twice * Implement function for generate UUID V4 * remove isDeterministicInScopeOfQuery for generateUUIDV4 * Uniformize RandX Implementation * rename generateUUIDV4 into generateUUIDv4 * Modify random function for making it more generic
25 lines
501 B
C++
25 lines
501 B
C++
#include <Functions/FunctionFactory.h>
|
|
#include <Functions/FunctionsRandom.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
namespace detail
|
|
{
|
|
void seed(LinearCongruentialGenerator & generator, intptr_t additional_seed)
|
|
{
|
|
generator.seed(intHash64(randomSeed() ^ intHash64(additional_seed)));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void registerFunctionsRandom(FunctionFactory & factory)
|
|
{
|
|
factory.registerFunction<FunctionRand>();
|
|
factory.registerFunction<FunctionRand64>();
|
|
factory.registerFunction<FunctionRandConstant>();
|
|
}
|
|
|
|
}
|