1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include <Functions/FunctionFactory.h>
#include <Functions/FunctionsRound.h>
namespace DB
{
REGISTER_FUNCTION(Round)
{
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);
factory.registerFunction<FunctionRoundDown>();
/// Compatibility aliases.
factory.registerAlias("ceiling", "ceil", FunctionFactory::CaseInsensitive);
factory.registerAlias("truncate", "trunc", FunctionFactory::CaseInsensitive);
}
}
|