This is an automated email from the ASF dual-hosted git repository. panxiaolei pushed a commit to branch pick_20083 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/pick_20083 by this push: new 6a8561507a upd 6a8561507a is described below commit 6a8561507ab67dd20391c630785c37be7476dca0 Author: BiteTheDDDDt <pxl...@qq.com> AuthorDate: Mon Jun 5 10:19:39 2023 +0800 upd --- .../java/org/apache/doris/analysis/FunctionCallExpr.java | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java index 9e1cf21648..1dee954964 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java @@ -528,18 +528,12 @@ public class FunctionCallExpr extends Expr { || fnName.getFunction().equalsIgnoreCase("sm4_encrypt"))) { result.add("\'***\'"); } else if (orderByElements.size() > 0 && i == len - orderByElements.size()) { - sb.append("ORDER BY "); - } - sb.append(children.get(i).toSql()); - if (orderByElements.size() > 0 && i >= len - orderByElements.size()) { - if (orderByElements.get(i - len + orderByElements.size()).getIsAsc()) { - sb.append(" ASC"); - } else { - sb.append(" DESC"); - } + result.add("ORDER BY " + children.get(i).toSql()); + } else { + result.add(children.get(i).toSql()); } } - sb.append(")"); + sb.append(Joiner.on(", ").join(result)).append(")"); return sb.toString(); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org