theosib-amazon commented on code in PR #960: URL: https://github.com/apache/parquet-mr/pull/960#discussion_r860183442
########## parquet-common/src/main/java/org/apache/parquet/bytes/ByteBufferInputStream.java: ########## @@ -74,11 +97,26 @@ public ByteBufferInputStream(ByteBuffer buffer) { */ @Deprecated public ByteBufferInputStream(ByteBuffer buffer, int offset, int count) { + // This is necessary to pass "TestDeprecatedBufferInputStream"... ByteBuffer temp = buffer.duplicate(); temp.position(offset); ByteBuffer byteBuf = temp.slice(); byteBuf.limit(count); delegate = wrap(byteBuf); + // ... but it would probably be faster to do this: +// delegate = wrap(buffer, offset, count); Review Comment: I have removed this at your request. The reason I put it there is that this is an inefficient way to do it. Future developers might want to know that and improve performance by doing it the other way and altering the test that unnecessarily forced this inefficient way of constructing. -- 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: dev-unsubscr...@parquet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org