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

    https://github.com/apache/spark/pull/23040#discussion_r234395227
  
    --- Diff: 
core/src/main/scala/org/apache/spark/util/io/ChunkedByteBuffer.scala ---
    @@ -222,7 +222,7 @@ private[spark] class ChunkedByteBufferInputStream(
         dispose: Boolean)
       extends InputStream {
     
    -  private[this] var chunks = chunkedByteBuffer.getChunks().iterator
    +  private[this] var chunks = 
chunkedByteBuffer.getChunks().filter(_.hasRemaining).iterator
    --- End diff --
    
    can you add a comment above, saying that we do this filter because `read` 
assumes `chunks` has no empty chunk?


---

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

Reply via email to