theosib-amazon commented on code in PR #960:
URL: https://github.com/apache/parquet-mr/pull/960#discussion_r934623419
##########
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:
Yeah. I put this here I think because I'm trying to make BufferInputStream
have the same functionality as multiple other things that I'm combining into
one. Some tests would be good. I'll see about writing some tests soon.
--
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]