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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/SearchSignature.java:
##########
@@ -267,33 +266,22 @@ private Pair<Boolean, Pair<Integer, Integer>> 
doMatchTypes(FunctionSignature sig
             DataType sigArgType = sig.getArgType(i);
             Expression argument = arguments.get(i);
             DataType realType = argument.getDataType();
-            if (hasTimeStampNsArgument && 
hasTimeStampNsCompatibleDateTimeArgument && hasDateLikeSignature
+            if (hasTimeStampNsArgument && hasOtherDateLikeArgument && 
hasDateLikeSignature
                     && realType.isDateLikeType() && 
!sigArgType.isDateLikeType()) {
                 // Do not bypass temporal exactness checks through a generic 
string overload.
                 return Pair.of(false, Pair.of(stringLiteralCoersionCount, 
timeZoneCoersionScore));
             }
-            if (hasTimeStampNsArgument && 
hasTimeStampNsCompatibleDateTimeArgument && hasDateLikeSignature
-                    && (realType.isTimeStampNsType() || 
realType.isDateTimeType()
-                            || realType.isDateTimeV2Type() || 
realType.isTimeStampTzType())
-                    && sigArgType.isDateLikeType() && 
!sigArgType.isTimeStampNsType()
-                    && !(computeSignature instanceof 
SupportsMixedTimeStampNsDateTime)) {
-                // Functions that need a common temporal type use the 
TIMESTAMP_NS overload.
-                // Functions without a common temporal result opt in to mixed 
physical signatures.
+            if (hasTimeStampNsArgument && hasOtherDateLikeArgument && 
hasDateLikeSignature

Review Comment:
   Let this case fail, use need to add explicit cast.



-- 
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