Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/19222#discussion_r171587203 --- Diff: common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java --- @@ -273,6 +286,7 @@ public long getPrefix() { * @param until the position after last code point, exclusive. */ public UTF8String substring(final int start, final int until) { + int numBytes = numBytes(); --- End diff -- see https://github.com/apache/spark/pull/19222/files#r171586767 Sorry for the back and forth, but just adding a duplicated `numBytes` field seems to make our life easier.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org