Github user peter-toth commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22617#discussion_r228944791
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/ExternalAppendOnlyUnsafeRowArrayBenchmark.scala
 ---
    @@ -68,9 +100,7 @@ object ExternalAppendOnlyUnsafeRowArrayBenchmark {
         benchmark.addCase("ExternalAppendOnlyUnsafeRowArray") { _: Int =>
           var sum = 0L
           for (_ <- 0L until iterations) {
    -        val array = new ExternalAppendOnlyUnsafeRowArray(
    -          
ExternalAppendOnlyUnsafeRowArray.DefaultInitialSizeOfInMemoryBuffer,
    -          numSpillThreshold)
    +        val array = new 
ExternalAppendOnlyUnsafeRowArray(numSpillThreshold, numSpillThreshold)
    --- End diff --
    
    Actually, following my logic in the description, I think 
    ```
    val array = new ExternalAppendOnlyUnsafeRowArray(numSpillThreshold, 
numSpillThreshold)
    ```
    should be changed to
    ```
    val array = new ExternalAppendOnlyUnsafeRowArray(0, numSpillThreshold)
    ```
    in `testAgainstRawUnsafeExternalSorter` in "WITH SPILL" cases so as to 
compare `ExternalAppendOnlyUnsafeRowArray` to `UnsafeExternalSorter` when it 
behaves so.
    
    But would be great if someone could confirm this idea.


---

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

Reply via email to