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

    https://github.com/apache/spark/pull/19222#discussion_r171588692
  
    --- Diff: 
common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java ---
    @@ -99,8 +99,15 @@ public static UTF8String fromBytes(byte[] bytes, int 
offset, int numBytes) {
       /**
        * Creates an UTF8String from given address (base and offset) and length.
        */
    -  public static UTF8String fromAddress(Object base, long offset, int 
numBytes) {
    -    return new UTF8String(base, offset, numBytes);
    +  public static UTF8String fromAddress(MemoryBlock base, long offset, int 
numBytes) {
    --- End diff --
    
    can we remove this method and ask the caller side to do
    ```
    UTF8String.fromMemoryBlock(block.subBlock(offset, length))
    ```


---

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

Reply via email to