2021-08-18 16:47:40 +00:00
|
|
|
#include <Functions/FunctionSnowflake.h>
|
|
|
|
#include <Functions/FunctionFactory.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2022-07-04 07:01:39 +00:00
|
|
|
REGISTER_FUNCTION(DateTimeToSnowflake)
|
2021-08-18 16:47:40 +00:00
|
|
|
{
|
|
|
|
factory.registerFunction("dateTimeToSnowflake",
|
|
|
|
[](ContextPtr){ return std::make_unique<FunctionToOverloadResolverAdaptor>(
|
|
|
|
std::make_shared<FunctionDateTimeToSnowflake>("dateTimeToSnowflake")); });
|
|
|
|
}
|
|
|
|
|
2022-07-04 07:01:39 +00:00
|
|
|
REGISTER_FUNCTION(DateTime64ToSnowflake)
|
2021-08-18 16:47:40 +00:00
|
|
|
{
|
|
|
|
factory.registerFunction("dateTime64ToSnowflake",
|
|
|
|
[](ContextPtr){ return std::make_unique<FunctionToOverloadResolverAdaptor>(
|
|
|
|
std::make_shared<FunctionDateTime64ToSnowflake>("dateTime64ToSnowflake")); });
|
|
|
|
}
|
|
|
|
|
2022-07-04 07:01:39 +00:00
|
|
|
REGISTER_FUNCTION(SnowflakeToDateTime)
|
2021-08-18 16:47:40 +00:00
|
|
|
{
|
|
|
|
factory.registerFunction("snowflakeToDateTime",
|
2023-06-11 07:40:39 +00:00
|
|
|
[](ContextPtr context){ return std::make_unique<FunctionToOverloadResolverAdaptor>(
|
2023-06-10 12:53:02 +00:00
|
|
|
std::make_shared<FunctionSnowflakeToDateTime>("snowflakeToDateTime", context)); });
|
2021-08-18 16:47:40 +00:00
|
|
|
}
|
2022-07-04 07:01:39 +00:00
|
|
|
REGISTER_FUNCTION(SnowflakeToDateTime64)
|
2021-08-18 16:47:40 +00:00
|
|
|
{
|
|
|
|
factory.registerFunction("snowflakeToDateTime64",
|
2023-06-10 12:53:02 +00:00
|
|
|
[](ContextPtr context){ return std::make_unique<FunctionToOverloadResolverAdaptor>(
|
|
|
|
std::make_shared<FunctionSnowflakeToDateTime64>("snowflakeToDateTime64", context)); });
|
2021-08-18 16:47:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|