mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
28 lines
810 B
C++
28 lines
810 B
C++
#include <Functions/FunctionMathUnary.h>
|
|
#include <Functions/FunctionFactory.h>
|
|
|
|
namespace DB
|
|
{
|
|
namespace
|
|
{
|
|
|
|
struct SinName { static constexpr auto name = "sin"; };
|
|
using FunctionSin = FunctionMathUnary<UnaryFunctionVectorized<SinName, sin>>;
|
|
|
|
}
|
|
|
|
REGISTER_FUNCTION(Sin)
|
|
{
|
|
factory.registerFunction<FunctionSin>(
|
|
FunctionDocumentation{
|
|
.description = "Returns the sine of the argument.",
|
|
.syntax = "sin(x)",
|
|
.arguments = {{"x", "The number whose sine will be returned. (U)Int*, Float* or Decimal*."}},
|
|
.returned_value = "The sine of x.",
|
|
.examples = {{.name = "simple", .query = "SELECT sin(1.23)", .result = "0.9424888019316975"}},
|
|
.categories{"Mathematical", "Trigonometric"}},
|
|
FunctionFactory::CaseInsensitive);
|
|
}
|
|
|
|
}
|