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

    https://github.com/apache/spark/pull/16252#discussion_r92521803
  
    --- Diff: 
core/src/main/scala/org/apache/spark/storage/memory/MemoryStore.scala ---
    @@ -694,7 +694,7 @@ private[storage] class PartiallyUnrolledIterator[T](
       }
     
       override def next(): T = {
    -    if (unrolled == null) {
    +    if (unrolled == null || !unrolled.hasNext) {
    --- End diff --
    
    Ok. It is fair to me to add `!unrolled.hasNext` to `next` for more 
predicable behavior.
    
    To throw a exception might be a little strange to me, as it still has 
elements so a no such element exception seems not correct. It just doesn't 
correctly fall back to `rest`.


---
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