pan3793 commented on code in PR #3041:
URL: https://github.com/apache/parquet-java/pull/3041#discussion_r1827220535


##########
parquet-common/src/main/java/org/apache/parquet/bytes/BytesInput.java:
##########
@@ -376,7 +377,11 @@ void writeInto(ByteBuffer buffer) {
         ByteBuffer workBuf = buffer.duplicate();
         int pos = buffer.position();
         workBuf.limit(pos + byteCount);
-        Channels.newChannel(in).read(workBuf);
+        ReadableByteChannel channel = Channels.newChannel(in);
+        int remaining = byteCount;
+        while (remaining > 0) {
+          remaining -= channel.read(workBuf);

Review Comment:
   added a check to detect EOF case



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to