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

    https://github.com/apache/spark/pull/19077#discussion_r144037069
  
    --- Diff: 
common/unsafe/src/main/java/org/apache/spark/unsafe/memory/MemoryBlock.java ---
    @@ -48,6 +49,15 @@ public long size() {
       }
     
       /**
    +   * Reset the size of the memory block.
    +   */
    +  public void resetSize(long len) {
    +    assert (ByteArrayMethods.roundNumberOfBytesToNearestWord(length) ==
    --- End diff --
    
    We'd better use `require` instead of `assert`.


---

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

Reply via email to