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

    https://github.com/apache/incubator-spark/pull/624#discussion_r9958856
  
    --- Diff: 
core/src/main/scala/org/apache/spark/util/collection/ExternalAppendOnlyMap.scala
 ---
    @@ -323,13 +327,12 @@ private[spark] class ExternalAppendOnlyMap[K, V, C](
         private case class StreamBuffer(iterator: Iterator[(K, C)], pairs: 
ArrayBuffer[(K, C)])
           extends Comparable[StreamBuffer] {
     
    -      def minKeyHash: Int = {
    -        if (pairs.length > 0){
    -          // pairs are already sorted by key hash
    -          pairs(0)._1.hashCode()
    -        } else {
    -          Int.MaxValue
    -        }
    +      def isEmpty = pairs.isEmpty
    +
    +      // Invalid if there are no more pairs in this stream
    --- End diff --
    
    nit: but maybe put this comment above the assert line rather than the 
function?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
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.
---

Reply via email to