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

    https://github.com/apache/spark/pull/19222#discussion_r171590355
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/SortBenchmark.scala
 ---
    @@ -36,7 +36,8 @@ import org.apache.spark.util.random.XORShiftRandom
     class SortBenchmark extends BenchmarkBase {
     
       private def referenceKeyPrefixSort(buf: LongArray, lo: Int, hi: Int, 
refCmp: PrefixComparator) {
    -    val sortBuffer = new LongArray(MemoryBlock.fromLongArray(new 
Array[Long](buf.size().toInt)))
    +    val sortBuffer =
    +      new LongArray(OnHeapMemoryBlock.fromArray(new 
Array[Long](buf.size().toInt)))
    --- End diff --
    
    shall we create a new constructor of `OnHeapMemoryBlock` that accepts a 
single size parameter?


---

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

Reply via email to