pan3793 commented on code in PR #3041: URL: https://github.com/apache/parquet-java/pull/3041#discussion_r1827221056
########## parquet-common/src/test/java/org/apache/parquet/bytes/TestBytesInput.java: ########## @@ -140,6 +140,20 @@ public void testFromInputStream() throws IOException { validate(data, factory); } + @Test + public void testFromLargeAvailableAgnosticInputStream() throws IOException { + // allocate a bytes that large than + // java.nio.channel.Channels.ReadableByteChannelImpl.TRANSFER_SIZE = 8192 + byte[] data = new byte[9 * 1024]; + RANDOM.nextBytes(data); + byte[] input = new byte[data.length + 10]; + RANDOM.nextBytes(input); + System.arraycopy(data, 0, input, 0, data.length); + Supplier<BytesInput> factory = () -> BytesInput.from(new AvailableAgnosticInputStream(input), 9 * 1024); Review Comment: I tend to use a new file as it is a quite common case that needs to be tested, it might be used in other places in the future. -- 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