jacktengg commented on code in PR #66333:
URL: https://github.com/apache/doris/pull/66333#discussion_r3713651279


##########
be/src/exprs/function/cast/function_cast_date.cpp:
##########
@@ -30,9 +30,14 @@ WrapperType create_datelike_wrapper(FunctionContext* 
context, const DataTypePtr&
     auto make_datelike_wrapper = [&](const auto& types) -> bool {
         using Types = std::decay_t<decltype(types)>;
         using FromDataType = typename Types::LeftType;
-        if constexpr (CastUtil::IsPureDigitType<FromDataType> || 
IsDatelikeTypes<FromDataType> ||
-                      IsStringType<FromDataType> ||
-                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
+        constexpr bool is_nano_source = std::is_same_v<FromDataType, 
DataTypeDateTimeV2Nano>;
+        constexpr bool is_nano_target = std::is_same_v<ToDataType, 
DataTypeDateTimeV2Nano>;
+        constexpr bool is_supported_nano_cast = is_nano_target && 
IsStringType<FromDataType>;

Review Comment:
   Same reason as previous comment.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to