w41ter commented on PR #44958:
URL: https://github.com/apache/doris/pull/44958#issuecomment-2522045213
> the right way to fix it is escaping comment string. the current way could
not process double quote in comment correctly.
`getComment(true)` already escapes the quote `"`, so this fix is right.
```
public String getComment(boolean escapeQuota) {
if (!escapeQuota) {
return comment;
}
return SqlUtils.escapeQuota(comment);
}
public static String escapeQuota(String str) {
if (Strings.isNullOrEmpty(str)) {
return str;
}
return str.replaceAll("\"", "\\\\\"");
}
```
--
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]