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>;
|
|
|
|
|
2022-07-04 07:01:39 +00:00
|
|
|
REGISTER_FUNCTION(ToStartOfMillisecond)
|
2022-02-13 14:54:03 +00:00
|
|
|
{
|
|
|
|
factory.registerFunction<FunctionToStartOfMillisecond>();
|
|
|
|
}
|
|
|
|
|
|
|
|
using FunctionToStartOfMicrosecond = FunctionDateOrDateTimeToSomething<DataTypeDateTime64, ToStartOfMicrosecondImpl>;
|
|
|
|
|
2022-07-04 07:01:39 +00:00
|
|
|
REGISTER_FUNCTION(ToStartOfMicrosecond)
|
2022-02-13 14:54:03 +00:00
|
|
|
{
|
|
|
|
factory.registerFunction<FunctionToStartOfMicrosecond>();
|
|
|
|
}
|
|
|
|
|
|
|
|
using FunctionToStartOfNanosecond = FunctionDateOrDateTimeToSomething<DataTypeDateTime64, ToStartOfNanosecondImpl>;
|
|
|
|
|
2022-07-04 07:01:39 +00:00
|
|
|
REGISTER_FUNCTION(ToStartOfNanosecond)
|
2022-02-13 14:54:03 +00:00
|
|
|
{
|
2022-02-13 15:41:45 +00:00
|
|
|
factory.registerFunction<FunctionToStartOfNanosecond>();
|
2022-02-13 14:54:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|