fix convertFieldToTypeImpl for Decimal64 -> DateTime

This commit is contained in:
Michael Stetsyuk 2024-09-18 18:51:49 +00:00
parent 52dc9a54a7
commit 4d2fbf83b9

View File

@ -243,9 +243,9 @@ Field convertFieldToTypeImpl(const Field & src, const IDataType & type, const ID
return dynamic_cast<const IDataTypeEnum &>(type).castToValue(src);
}
if ((which_type.isDate() || which_type.isDateTime()) && src.getType() == Field::Types::UInt64)
if ((which_type.isDate() || which_type.isDateTime()) && (src.getType() == Field::Types::UInt64 || src.getType() == Field::Types::Decimal64))
{
/// We don't need any conversion UInt64 is under type of Date and DateTime
/// We don't need any conversion as both Decimal64 and UInt64 are under types of Date and DateTime
return src;
}