mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-01 20:12:02 +00:00
25 lines
485 B
C++
25 lines
485 B
C++
#include <Functions/FunctionUnixTimestamp64.h>
|
|
#include <Functions/FunctionFactory.h>
|
|
|
|
namespace DB
|
|
{
|
|
namespace
|
|
{
|
|
|
|
struct TransformToMilli
|
|
{
|
|
static constexpr auto name = "toUnixTimestamp64Milli";
|
|
static constexpr auto target_scale = 3;
|
|
using SourceDataType = DataTypeDateTime64;
|
|
using ResultDataType = DataTypeInt64;
|
|
};
|
|
|
|
}
|
|
|
|
void registerToUnixTimestamp64Milli(FunctionFactory & factory)
|
|
{
|
|
factory.registerFunction<FunctionUnixTimestamp64<TransformToMilli>>();
|
|
}
|
|
|
|
}
|