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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to