mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 21:42:39 +00:00
21 lines
478 B
C++
21 lines
478 B
C++
|
#include <Functions/FunctionUnixTimestamp64.h>
|
||
|
#include <Functions/FunctionFactory.h>
|
||
|
|
||
|
namespace DB
|
||
|
{
|
||
|
|
||
|
struct TransformFromMilli
|
||
|
{
|
||
|
static constexpr auto name = "fromUnixTimestamp64Milli";
|
||
|
static constexpr auto target_scale = 3;
|
||
|
using SourceDataType = DataTypeInt64;
|
||
|
using ResultDataType = DataTypeDateTime64;
|
||
|
};
|
||
|
|
||
|
void registerFromUnixTimestamp64Milli(FunctionFactory & factory)
|
||
|
{
|
||
|
factory.registerFunction<FunctionUnixTimestamp64<TransformFromMilli>>();
|
||
|
}
|
||
|
|
||
|
}
|