morrySnow commented on code in PR #23860:
URL: https://github.com/apache/doris/pull/23860#discussion_r1314690772
##########
fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java:
##########
@@ -551,6 +551,19 @@ private String paramsToSql() {
sb.append("DISTINCT ");
}
int len = children.size();
+
+ if (fnName.getFunction().equalsIgnoreCase("char")) {
+ for (int i = 1; i < len; ++i) {
+ sb.append(children.get(i).toSql());
+ if (i < len - 1) {
+ sb.append(", ");
+ }
+ }
+ sb.append(" using ");
+ sb.append(children.get(0).toSql().replace("'", "")).append(")");
Review Comment:
i think we should use substr() to remove the first and the last character.
replace will generate wrong sql, think about `'ab\'c'`
--
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]