Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19222#discussion_r177686396
  
    --- Diff: 
common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java ---
    @@ -90,19 +95,13 @@ public static UTF8String fromBytes(byte[] bytes) {
        */
       public static UTF8String fromBytes(byte[] bytes, int offset, int 
numBytes) {
         if (bytes != null) {
    -      return new UTF8String(bytes, BYTE_ARRAY_OFFSET + offset, numBytes);
    +      return new UTF8String(
    +        MemoryBlock.allocateFromObject(bytes, BYTE_ARRAY_OFFSET + offset, 
numBytes));
    --- End diff --
    
    ditto


---

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

Reply via email to