Github user sarutak commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12939#discussion_r62718307
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/package.scala ---
    @@ -162,7 +162,8 @@ package object util {
       def toCommentSafeString(str: String): String = {
         val len = math.min(str.length, 128)
         val suffix = if (str.length > len) "..." else ""
    -    str.substring(0, len).replace("*/", "\\*\\/").replace("\\u", "\\\\u") 
+ suffix
    +    str.substring(0, len).replace("*/", "\\*\\/")
    +      .replaceAll("(^|[^\\\\])(\\\\(\\\\\\\\)*u)", "$1\\\\$2") + suffix
    --- End diff --
    
    Thanks for the suggestion @mhseiden .
    I tried escaping by `escapeJava` and it may fix this issue but I noticed it 
escapes all of "\", means the number of "\" will be doubled.
    For example, "\\\u0022" will be "\\\\\\u0022" but I expects only "\" just 
before "u" will be escaped if the number of "\" is odd.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to