mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Added "POWER" alias to "pow" function; made some math functions case insensitive for compatibility #3638
This commit is contained in:
parent
6e2a6d9894
commit
954c974507
@ -11,26 +11,28 @@ const double PiImpl::value = 3.1415926535897932384626433832795028841971693;
|
||||
void registerFunctionsMath(FunctionFactory & factory)
|
||||
{
|
||||
factory.registerFunction<FunctionE>();
|
||||
factory.registerFunction<FunctionPi>();
|
||||
factory.registerFunction<FunctionExp>();
|
||||
factory.registerFunction<FunctionLog>();
|
||||
factory.registerFunction<FunctionPi>(FunctionFactory::CaseInsensitive);
|
||||
factory.registerFunction<FunctionExp>(FunctionFactory::CaseInsensitive);
|
||||
factory.registerFunction<FunctionLog>(FunctionFactory::CaseInsensitive);
|
||||
factory.registerFunction<FunctionExp2>();
|
||||
factory.registerFunction<FunctionLog2>();
|
||||
factory.registerFunction<FunctionLog2>(FunctionFactory::CaseInsensitive);
|
||||
factory.registerFunction<FunctionExp10>();
|
||||
factory.registerFunction<FunctionLog10>();
|
||||
factory.registerFunction<FunctionSqrt>();
|
||||
factory.registerFunction<FunctionLog10>(FunctionFactory::CaseInsensitive);
|
||||
factory.registerFunction<FunctionSqrt>(FunctionFactory::CaseInsensitive);
|
||||
factory.registerFunction<FunctionCbrt>();
|
||||
factory.registerFunction<FunctionErf>();
|
||||
factory.registerFunction<FunctionErfc>();
|
||||
factory.registerFunction<FunctionLGamma>();
|
||||
factory.registerFunction<FunctionTGamma>();
|
||||
factory.registerFunction<FunctionSin>();
|
||||
factory.registerFunction<FunctionCos>();
|
||||
factory.registerFunction<FunctionTan>();
|
||||
factory.registerFunction<FunctionAsin>();
|
||||
factory.registerFunction<FunctionAcos>();
|
||||
factory.registerFunction<FunctionAtan>();
|
||||
factory.registerFunction<FunctionPow>();
|
||||
factory.registerFunction<FunctionSin>(FunctionFactory::CaseInsensitive);
|
||||
factory.registerFunction<FunctionCos>(FunctionFactory::CaseInsensitive);
|
||||
factory.registerFunction<FunctionTan>(FunctionFactory::CaseInsensitive);
|
||||
factory.registerFunction<FunctionAsin>(FunctionFactory::CaseInsensitive);
|
||||
factory.registerFunction<FunctionAcos>(FunctionFactory::CaseInsensitive);
|
||||
factory.registerFunction<FunctionAtan>(FunctionFactory::CaseInsensitive);
|
||||
factory.registerFunction<FunctionPow>(FunctionFactory::CaseInsensitive);
|
||||
|
||||
factory.registerAlias("power", "pow", FunctionFactory::CaseInsensitive);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1 @@
|
||||
9 9 9 9
|
1
dbms/tests/queries/0_stateless/00756_power_alias.sql
Normal file
1
dbms/tests/queries/0_stateless/00756_power_alias.sql
Normal file
@ -0,0 +1 @@
|
||||
SELECT pow(3, 2), POW(3, 2), power(3, 2), POWER(3, 2);
|
Loading…
Reference in New Issue
Block a user