morrySnow commented on code in PR #23104: URL: https://github.com/apache/doris/pull/23104#discussion_r1309593643
########## fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java: ########## @@ -1185,6 +1185,32 @@ public Expression visitEncryptKey(DorisParser.EncryptKeyContext ctx) { return new EncryptKeyRef(new StringLiteral(db), new StringLiteral(key)); } + @Override + public Expression visitUseFunction(DorisParser.UseFunctionContext ctx) { + List<Expression> arguments; + if (ctx.name.getText().equalsIgnoreCase("CHAR")) { + String usingArg = ctx.usingArg == null ? "utf8" : ctx.usingArg.getText(); + arguments = ImmutableList.<Expression>builder() + .add(new StringLiteral(usingArg)) + .addAll(visit(ctx.arguments, Expression.class)) + .build(); + } else if (ctx.name.getText().equalsIgnoreCase("CONVERT")) { Review Comment: if `convert` without `using`, u should return `cast(arg0 as arg1)` other wise u should return `convert_to(arg0, arg1)` -- 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