ClickHouse/dbms/src/Functions/FunctionsRandom.cpp
Guillaume Tassery 03bbe9938a Function for generate an uuid v4 (#1008)
* 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
2017-07-25 20:00:38 +03:00

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>();
}
}