englefly commented on code in PR #14662:
URL: https://github.com/apache/doris/pull/14662#discussion_r1036874525
##########
fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java:
##########
@@ -363,6 +363,16 @@ private String paramsToSql() {
}
int len = children.size();
List<String> result = Lists.newArrayList();
+ if (fnName.getFunction().equalsIgnoreCase("years_diff")
+ || fnName.getFunction().equalsIgnoreCase("months_diff")
+ || fnName.getFunction().equalsIgnoreCase("days_diff")
+ || fnName.getFunction().equalsIgnoreCase("hours_diff")
+ || fnName.getFunction().equalsIgnoreCase("minutes_diff")
+ || fnName.getFunction().equalsIgnoreCase("seconds_diff")) {
+ sb.append(children.get(1).toSql()).append(", ");
+ sb.append(children.get(0).toSql()).append(")");
+ return sb.toString();
+ }
Review Comment:
I already add regression case for these functions. If someone remove the
above code, the regression cases are failed.
--
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]