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

    https://github.com/apache/spark/pull/22048#discussion_r214626069
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -2794,6 +2794,30 @@ private[spark] object Utils extends Logging {
           }
         }
       }
    +
    +  /**
    +   * Regular expression matching full width characters
    +   */
    +  private val fullWidthRegex = ("""[""" +
    +    // scalastyle:off nonascii
    +    """\u1100-\u115F""" +
    +    """\u2E80-\uA4CF""" +
    +    """\uAC00-\uD7A3""" +
    +    """\uF900-\uFAFF""" +
    +    """\uFE10-\uFE19""" +
    +    """\uFE30-\uFE6F""" +
    +    """\uFF00-\uFF60""" +
    +    """\uFFE0-\uFFE6""" +
    --- End diff --
    
    > I looked at all the 0x0000-0xFFFF characters (unicode) and showed them 
under Xshell, then found all the full width characters. Get the regular 
expression.
    
    Can you describe them there and put a references to a public unicode 
document?
    See the comment in `UTF8String`;
    
https://github.com/apache/spark/blob/master/common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java#L65
    
    > It takes 49 milliseconds to complete matching all 1000 strings.
    
    How about some additional overheads when calling `showString` as compared 
to `showString ` w/o this patch?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to