theosib-amazon commented on code in PR #960: URL: https://github.com/apache/parquet-mr/pull/960#discussion_r934670047
########## parquet-common/src/main/java/org/apache/parquet/bytes/SingleBufferInputStream.java: ########## @@ -38,6 +39,34 @@ class SingleBufferInputStream extends ByteBufferInputStream { // duplicate the buffer because its state will be modified this.buffer = buffer.duplicate(); this.startPosition = buffer.position(); + this.buffer.order(java.nio.ByteOrder.LITTLE_ENDIAN); + } + + SingleBufferInputStream(ByteBuffer buffer, int start, int length) { + // duplicate the buffer because its state will be modified + this.buffer = buffer.duplicate(); + this.startPosition = start; + this.buffer.position(start); + this.buffer.limit(start + length); + this.buffer.order(java.nio.ByteOrder.LITTLE_ENDIAN); + } + + SingleBufferInputStream(byte[] inBuf) { Review Comment: I removed this constructor because it's much better to have this be a compile-time error than a runtime error. -- 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