mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-11 17:02:25 +00:00
Continue
This commit is contained in:
parent
a5383a4619
commit
5336a89117
@ -644,6 +644,33 @@ struct ConvertImpl
|
|||||||
return DateTimeTransformImpl<FromDataType, ToDataType, ToDateTimeTransform64Signed<typename FromDataType::FieldType, UInt32, default_date_time_overflow_behavior>, false>::execute(
|
return DateTimeTransformImpl<FromDataType, ToDataType, ToDateTimeTransform64Signed<typename FromDataType::FieldType, UInt32, default_date_time_overflow_behavior>, false>::execute(
|
||||||
arguments, result_type, input_rows_count);
|
arguments, result_type, input_rows_count);
|
||||||
}
|
}
|
||||||
|
else if constexpr ((
|
||||||
|
std::is_same_v<FromDataType, DataTypeInt8>
|
||||||
|
|| std::is_same_v<FromDataType, DataTypeInt16>
|
||||||
|
|| std::is_same_v<FromDataType, DataTypeInt32>
|
||||||
|
|| std::is_same_v<FromDataType, DataTypeInt64>)
|
||||||
|
&& std::is_same_v<ToDataType, DataTypeDateTime64>
|
||||||
|
&& std::is_same_v<SpecialTag, ConvertDefaultBehaviorTag>)
|
||||||
|
{
|
||||||
|
return DateTimeTransformImpl<FromDataType, ToDataType, ToDateTime64TransformSigned<typename FromDataType::FieldType, default_date_time_overflow_behavior>, false>::execute(
|
||||||
|
arguments, result_type, input_rows_count);
|
||||||
|
}
|
||||||
|
else if constexpr (std::is_same_v<FromDataType, DataTypeUInt64>
|
||||||
|
&& std::is_same_v<ToDataType, DataTypeDateTime64>
|
||||||
|
&& std::is_same_v<SpecialTag, ConvertDefaultBehaviorTag>)
|
||||||
|
{
|
||||||
|
return DateTimeTransformImpl<FromDataType, ToDataType, ToDateTime64TransformUnsigned<UInt64, default_date_time_overflow_behavior>, false>::execute(
|
||||||
|
arguments, result_type, input_rows_count);
|
||||||
|
}
|
||||||
|
else if constexpr ((
|
||||||
|
std::is_same_v<FromDataType, DataTypeFloat32>
|
||||||
|
|| std::is_same_v<FromDataType, DataTypeFloat64>)
|
||||||
|
&& std::is_same_v<ToDataType, DataTypeDateTime64>
|
||||||
|
&& std::is_same_v<SpecialTag, ConvertDefaultBehaviorTag>)
|
||||||
|
{
|
||||||
|
return DateTimeTransformImpl<FromDataType, ToDataType, ToDateTime64TransformFloat<FromDataType, typename FromDataType::FieldType, default_date_time_overflow_behavior>, false>::execute(
|
||||||
|
arguments, result_type, input_rows_count);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
using ColVecFrom = typename FromDataType::ColumnType;
|
using ColVecFrom = typename FromDataType::ColumnType;
|
||||||
@ -893,35 +920,6 @@ struct ConvertImpl
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template <typename Name, FormatSettings::DateTimeOverflowBehavior date_time_overflow_behavior>
|
|
||||||
struct ConvertImpl<DataTypeInt8, DataTypeDateTime64, Name, ConvertDefaultBehaviorTag, date_time_overflow_behavior>
|
|
||||||
: DateTimeTransformImpl<DataTypeInt8, DataTypeDateTime64, ToDateTime64TransformSigned<Int8, date_time_overflow_behavior>, false> {};
|
|
||||||
|
|
||||||
template <typename Name, FormatSettings::DateTimeOverflowBehavior date_time_overflow_behavior>
|
|
||||||
struct ConvertImpl<DataTypeInt16, DataTypeDateTime64, Name, ConvertDefaultBehaviorTag, date_time_overflow_behavior>
|
|
||||||
: DateTimeTransformImpl<DataTypeInt16, DataTypeDateTime64, ToDateTime64TransformSigned<Int16, date_time_overflow_behavior>, false> {};
|
|
||||||
|
|
||||||
template <typename Name, FormatSettings::DateTimeOverflowBehavior date_time_overflow_behavior>
|
|
||||||
struct ConvertImpl<DataTypeInt32, DataTypeDateTime64, Name, ConvertDefaultBehaviorTag, date_time_overflow_behavior>
|
|
||||||
: DateTimeTransformImpl<DataTypeInt32, DataTypeDateTime64, ToDateTime64TransformSigned<Int32, date_time_overflow_behavior>, false> {};
|
|
||||||
|
|
||||||
template <typename Name, FormatSettings::DateTimeOverflowBehavior date_time_overflow_behavior>
|
|
||||||
struct ConvertImpl<DataTypeInt64, DataTypeDateTime64, Name, ConvertDefaultBehaviorTag, date_time_overflow_behavior>
|
|
||||||
: DateTimeTransformImpl<DataTypeInt64, DataTypeDateTime64, ToDateTime64TransformSigned<Int64, date_time_overflow_behavior>, false> {};
|
|
||||||
|
|
||||||
template <typename Name, FormatSettings::DateTimeOverflowBehavior date_time_overflow_behavior>
|
|
||||||
struct ConvertImpl<DataTypeUInt64, DataTypeDateTime64, Name, ConvertDefaultBehaviorTag, date_time_overflow_behavior>
|
|
||||||
: DateTimeTransformImpl<DataTypeUInt64, DataTypeDateTime64, ToDateTime64TransformUnsigned<UInt64, date_time_overflow_behavior>, false> {};
|
|
||||||
|
|
||||||
template <typename Name, FormatSettings::DateTimeOverflowBehavior date_time_overflow_behavior>
|
|
||||||
struct ConvertImpl<DataTypeFloat32, DataTypeDateTime64, Name, ConvertDefaultBehaviorTag, date_time_overflow_behavior>
|
|
||||||
: DateTimeTransformImpl<DataTypeFloat32, DataTypeDateTime64, ToDateTime64TransformFloat<DataTypeFloat32, Float32, date_time_overflow_behavior>, false> {};
|
|
||||||
|
|
||||||
template <typename Name, FormatSettings::DateTimeOverflowBehavior date_time_overflow_behavior>
|
|
||||||
struct ConvertImpl<DataTypeFloat64, DataTypeDateTime64, Name, ConvertDefaultBehaviorTag, date_time_overflow_behavior>
|
|
||||||
: DateTimeTransformImpl<DataTypeFloat64, DataTypeDateTime64, ToDateTime64TransformFloat<DataTypeFloat64, Float64, date_time_overflow_behavior>, false> {};
|
|
||||||
|
|
||||||
|
|
||||||
/** Conversion of DateTime64 to Date or DateTime: discards fractional part.
|
/** Conversion of DateTime64 to Date or DateTime: discards fractional part.
|
||||||
*/
|
*/
|
||||||
template <typename Name, FormatSettings::DateTimeOverflowBehavior date_time_overflow_behavior>
|
template <typename Name, FormatSettings::DateTimeOverflowBehavior date_time_overflow_behavior>
|
||||||
|
Loading…
Reference in New Issue
Block a user