Github user ConeyLiu commented on a diff in the pull request: https://github.com/apache/spark/pull/20026#discussion_r158220052 --- 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 -- This should be a bug. The byteBuffer is fiped after `fileChannel.read(byteBuffer)`, so if then we can read the remaining dirty data. The test case will be add latter. I'm not sure this is should be another patch. @cloud-fan
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org