ClickHouse/src/Functions/fromUnixTimestamp64Micro.cpp
Vasily Nemkov 28a2cc0a82 Functions {to,from}UnixTimestamp64{Milli,Micro,Nano}
* Family of functions to convert DateTime64 to Int64 and back, usefull for
   imporintg/exporting raw timestamp values of certain precision.
 * Docs
 * Tests
 * Fixed ya.make
2020-05-26 16:42:22 +03:00

21 lines
478 B
C++

#include <Functions/FunctionUnixTimestamp64.h>
#include <Functions/FunctionFactory.h>
namespace DB
{
struct TransformFromMicro
{
static constexpr auto name = "fromUnixTimestamp64Micro";
static constexpr auto target_scale = 6;
using SourceDataType = DataTypeInt64;
using ResultDataType = DataTypeDateTime64;
};
void registerFromUnixTimestamp64Micro(FunctionFactory & factory)
{
factory.registerFunction<FunctionUnixTimestamp64<TransformFromMicro>>();
}
}