diff --git a/dbms/src/Interpreters/convertFieldToType.cpp b/dbms/src/Interpreters/convertFieldToType.cpp index 3104d612e43..8bc6ee5b9d5 100644 --- a/dbms/src/Interpreters/convertFieldToType.cpp +++ b/dbms/src/Interpreters/convertFieldToType.cpp @@ -187,6 +187,12 @@ Field convertFieldToTypeImpl(const Field & src, const IDataType & type, const ID return dynamic_cast(type).castToValue(src); } + if (which_type.isDateOrDateTime() && src.getType() == Field::Types::UInt64) + { + /// We don't need any conversion UInt64 is under type of Date and DateTime + return src; + } + if (src.getType() == Field::Types::String) { if (which_type.isDate())