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

    https://github.com/apache/spark/pull/6397#discussion_r31384774
  
    --- Diff: 
core/src/main/scala/org/apache/spark/util/collection/ExternalSorter.scala ---
    @@ -238,46 +230,33 @@ private[spark] class ExternalSorter[K, V, C](
           }
         } else {
           if (maybeSpill(buffer, buffer.estimateSize())) {
    -        buffer = if (useSerializedPairBuffer) {
    -          new PartitionedSerializedPairBuffer[K, C](metaInitialRecords, 
kvChunkSize, serInstance)
    -        } else {
    -          new PartitionedPairBuffer[K, C]
    -        }
    +        buffer = newBuffer()
           }
         }
       }
     
       /**
    -   * Spill the current in-memory collection to disk, adding a new file to 
spills, and clear it.
    -   */
    -  override protected[this] def spill(collection: 
WritablePartitionedPairCollection[K, C]): Unit = {
    -    if (bypassMergeSort) {
    --- End diff --
    
    To clarify a little further, since we no longer buffered records in memory 
when `bypassMergeSort` was true, this branch would never be taken.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to