mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-02 04:22:03 +00:00
25 lines
449 B
C++
25 lines
449 B
C++
#include <Functions/FunctionFactory.h>
|
|
#include <Functions/FunctionMathConstFloat64.h>
|
|
|
|
namespace DB
|
|
{
|
|
namespace
|
|
{
|
|
|
|
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);
|
|
}
|
|
|
|
}
|