sohardforaname commented on code in PR #18209:
URL: https://github.com/apache/doris/pull/18209#discussion_r1189475590
##########
fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java:
##########
@@ -1337,7 +1337,8 @@ public void analyzeImpl(Analyzer analyzer) throws
AnalysisException {
Function.CompareMode.IS_NONSTRICT_SUPERTYPE_OF);
} else if (fnName.getFunction().equalsIgnoreCase("if")) {
Type[] childTypes = collectChildReturnTypes();
- Type assignmentCompatibleType =
ScalarType.getAssignmentCompatibleType(childTypes[1], childTypes[2], true);
+ Type assignmentCompatibleType = Type.convertDateLikeTypeToV2(
+ ScalarType.getAssignmentCompatibleType(childTypes[1],
childTypes[2], true));
Review Comment:
because the assignmentCompatibleType may be date and childType is [date,
null_type], and the null_type will be replaced to datev2 type, so we add this
to ensure the assignmentCompatibleType is datev2 type
--
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]