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

    https://github.com/apache/spark/pull/20026#discussion_r158235088
  
    --- Diff: 
core/src/main/java/org/apache/spark/io/NioBufferedFileInputStream.java ---
    @@ -61,6 +61,7 @@ private boolean refill() throws IOException {
             nRead = fileChannel.read(byteBuffer);
           }
           if (nRead < 0) {
    +        byteBuffer.flip();
    --- End diff --
    
    Doesn't `nRead < 0` means we actually don't read any bytes?


---

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

Reply via email to