ClickHouse/src/Functions/toUnixTimestamp64Micro.cpp

25 lines
485 B
C++
Raw Normal View History

#include <Functions/FunctionUnixTimestamp64.h>
#include <Functions/FunctionFactory.h>
namespace DB
{
2020-09-07 18:00:37 +00:00
namespace
{
struct TransformToMicro
{
static constexpr auto name = "toUnixTimestamp64Micro";
static constexpr auto target_scale = 6;
using SourceDataType = DataTypeDateTime64;
using ResultDataType = DataTypeInt64;
};
2020-09-07 18:00:37 +00:00
}
void registerToUnixTimestamp64Micro(FunctionFactory & factory)
{
factory.registerFunction<FunctionUnixTimestamp64<TransformToMicro>>();
}
}