From 2252ee5a9012b39891a2d09e2e21fef6d75a8a67 Mon Sep 17 00:00:00 2001 From: Dmitry Rubashkin Date: Tue, 17 Sep 2019 11:17:46 +0300 Subject: [PATCH] Branch refactoring. --- dbms/src/Interpreters/convertFieldToType.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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())