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: 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