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
|
|
|
|
{
|
|
|
|
|
2022-07-04 07:01:39 +00:00
|
|
|
REGISTER_FUNCTION(Round)
|
2014-08-22 00:57:20 +00:00
|
|
|
{
|
2022-08-27 20:06:03 +00:00
|
|
|
factory.registerFunction<FunctionRound>("round", {}, FunctionFactory::CaseInsensitive);
|
|
|
|
factory.registerFunction<FunctionRoundBankers>("roundBankers", {}, FunctionFactory::CaseSensitive);
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
}
|