mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 21:51:57 +00:00
f6c264b70b
* Every function in its own file, part 9 [#CLICKHOUSE-2] * Every function in its own file, part 9 [#CLICKHOUSE-2]
21 lines
434 B
C++
21 lines
434 B
C++
#include <Functions/FunctionFactory.h>
|
|
#include <Functions/FunctionMathConstFloat64.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
struct PiImpl
|
|
{
|
|
static constexpr auto name = "pi";
|
|
static constexpr double value = 3.1415926535897932384626433832795028841971693;
|
|
};
|
|
|
|
using FunctionPi = FunctionMathConstFloat64<PiImpl>;
|
|
|
|
void registerFunctionPi(FunctionFactory & factory)
|
|
{
|
|
factory.registerFunction<FunctionPi>(FunctionFactory::CaseInsensitive);
|
|
}
|
|
|
|
}
|