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

    https://github.com/apache/spark/pull/19222#discussion_r170842910
  
    --- Diff: 
common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java ---
    @@ -195,15 +205,15 @@ private static int numBytesForFirstByte(final byte b) 
{
        * Returns the number of bytes
        */
       public int numBytes() {
    -    return numBytes;
    +    return (int)base.size();
    --- End diff --
    
    Yes, I believe that `UTF8String` always puts int value into 
`MemoryBlock.size`. However, some corruption may occur. Let me add assertion 
for testing.


---

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

Reply via email to