mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-14 11:33:46 +00:00
21 lines
466 B
C++
21 lines
466 B
C++
|
#include <Functions/FunctionUnixTimestamp64.h>
|
||
|
#include <Functions/FunctionFactory.h>
|
||
|
|
||
|
namespace DB
|
||
|
{
|
||
|
|
||
|
struct TransformToNano
|
||
|
{
|
||
|
static constexpr auto name = "toUnixTimestamp64Nano";
|
||
|
static constexpr auto target_scale = 9;
|
||
|
using SourceDataType = DataTypeDateTime64;
|
||
|
using ResultDataType = DataTypeInt64;
|
||
|
};
|
||
|
|
||
|
void registerToUnixTimestamp64Nano(FunctionFactory & factory)
|
||
|
{
|
||
|
factory.registerFunction<FunctionUnixTimestamp64<TransformToNano>>();
|
||
|
}
|
||
|
|
||
|
}
|