2022-02-13 14:54:03 +00:00
|
|
|
#include <Functions/FunctionFactory.h>
|
|
|
|
#include <Functions/DateTimeTransforms.h>
|
|
|
|
#include <Functions/FunctionDateOrDateTimeToSomething.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
using FunctionToStartOfMillisecond = FunctionDateOrDateTimeToSomething<DataTypeDateTime64, ToStartOfMillisecondImpl>;
|
|
|
|
|
|
|
|
void registerFunctionToStartOfMillisecond(FunctionFactory & factory)
|
|
|
|
{
|
|
|
|
factory.registerFunction<FunctionToStartOfMillisecond>();
|
|
|
|
}
|
|
|
|
|
|
|
|
using FunctionToStartOfMicrosecond = FunctionDateOrDateTimeToSomething<DataTypeDateTime64, ToStartOfMicrosecondImpl>;
|
|
|
|
|
|
|
|
void registerFunctionToStartOfMicrosecond(FunctionFactory & factory)
|
|
|
|
{
|
|
|
|
factory.registerFunction<FunctionToStartOfMicrosecond>();
|
|
|
|
}
|
|
|
|
|
|
|
|
using FunctionToStartOfNanosecond = FunctionDateOrDateTimeToSomething<DataTypeDateTime64, ToStartOfNanosecondImpl>;
|
|
|
|
|
|
|
|
void registerFunctionToStartOfNanosecond(FunctionFactory & factory)
|
|
|
|
{
|
2022-02-13 15:41:45 +00:00
|
|
|
factory.registerFunction<FunctionToStartOfNanosecond>();
|
2022-02-13 14:54:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|