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

    https://github.com/apache/spark/pull/18843#discussion_r132146376
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/ExternalAppendOnlyUnsafeRowArray.scala
 ---
    @@ -31,16 +31,16 @@ import org.apache.spark.storage.BlockManager
     import org.apache.spark.util.collection.unsafe.sort.{UnsafeExternalSorter, 
UnsafeSorterIterator}
     
     /**
    - * An append-only array for [[UnsafeRow]]s that spills content to disk 
when there a predefined
    - * threshold of rows is reached.
    + * An append-only array for [[UnsafeRow]]s that strictly keeps content in 
an in-memory array
    + * until [[numRowsInMemoryBufferThreshold]] is reached post which it will 
switch to a mode which
    + * would flush to disk after [[numRowsSpillThreshold]] is met (or before 
if there is
    + * excessive memory consumption). Setting these threshold involves 
following trade-offs:
      *
    - * Setting spill threshold faces following trade-off:
    - *
    - * - If the spill threshold is too high, the in-memory array may occupy 
more memory than is
    - *   available, resulting in OOM.
    - * - If the spill threshold is too low, we spill frequently and incur 
unnecessary disk writes.
    - *   This may lead to a performance regression compared to the normal case 
of using an
    - *   [[ArrayBuffer]] or [[Array]].
    + * - If [[numRowsSpillThreshold]] is too high, the in-memory array may 
occupy more memory than
    --- End diff --
    
    typo? this should be `numRowsInMemoryBufferThreshold`. We may spill before 
reaching `numRowsSpillThreshold` if memory is not enough.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to