2017-04-01 09:19:00 +00:00
|
|
|
#include <Functions/FunctionFactory.h>
|
|
|
|
#include <Functions/FunctionsRound.h>
|
2019-12-29 01:13:17 +00:00
|
|
|
|
2014-08-22 00:57:20 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
void registerFunctionsRound(FunctionFactory & factory)
|
|
|
|
{
|
2018-02-06 19:34:53 +00:00
|
|
|
factory.registerFunction<FunctionRound>("round", FunctionFactory::CaseInsensitive);
|
2019-12-13 14:50:14 +00:00
|
|
|
factory.registerFunction<FunctionRoundBankers>("roundBankers", FunctionFactory::CaseInsensitive);
|
2018-02-06 19:34:53 +00:00
|
|
|
factory.registerFunction<FunctionFloor>("floor", FunctionFactory::CaseInsensitive);
|
|
|
|
factory.registerFunction<FunctionCeil>("ceil", FunctionFactory::CaseInsensitive);
|
|
|
|
factory.registerFunction<FunctionTrunc>("trunc", FunctionFactory::CaseInsensitive);
|
2018-11-30 16:07:49 +00:00
|
|
|
factory.registerFunction<FunctionRoundDown>();
|
2017-09-16 22:11:20 +00:00
|
|
|
|
|
|
|
/// Compatibility aliases.
|
2018-07-25 16:08:23 +00:00
|
|
|
factory.registerAlias("ceiling", "ceil", FunctionFactory::CaseInsensitive);
|
|
|
|
factory.registerAlias("truncate", "trunc", FunctionFactory::CaseInsensitive);
|
2014-08-22 00:57:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|