ClickHouse/src/Functions/rand.cpp

22 lines
416 B
C++
Raw Normal View History

#include <Functions/FunctionFactory.h>
#include <Functions/FunctionsRandom.h>
namespace DB
{
2020-09-07 18:00:37 +00:00
namespace
{
struct NameRand { static constexpr auto name = "rand"; };
using FunctionRand = FunctionRandom<UInt32, NameRand>;
2020-09-07 18:00:37 +00:00
}
void registerFunctionRand(FunctionFactory & factory)
{
factory.registerFunction<FunctionRand>(FunctionFactory::CaseInsensitive);
2020-05-25 01:03:30 +00:00
factory.registerAlias("rand32", NameRand::name);
}
}