Github user tarekauel commented on a diff in the pull request: https://github.com/apache/spark/pull/7208#discussion_r33945643 --- Diff: unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java --- @@ -165,6 +165,20 @@ public UTF8String toLowerCase() { return UTF8String.fromString(toString().toLowerCase()); } + public UTF8String initCap(final byte[] byteArr) { + if (byteArr == null) return null; + if (byteArr[0] <= 122 && byteArr[0] >= 97) //a-z --- End diff -- I don't agree with that. Apache commons lang wordutils can handle this: http://grepcode.com/file/repo1.maven.org/maven2/commons-lang/commons-lang/2.6/org/apache/commons/lang/WordUtils.java#WordUtils.capitalize%28java.lang.String%29 ``` scala> Character.toTitleCase('ä') res52: Char = à ``` There seems to be not `toUpper` of Java `StringBuilder` http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuilder.html `String` does it support: ``` scala> "äöü".toUpperCase() res57: String = ÃÃà ```
--- 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