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: issues-unsubscr...@parquet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@parquet.apache.org For additional commands, e-mail: issues-h...@parquet.apache.org