Skip to content

Commit

Permalink
Fix the length of offsets array in parquet short decimal value decoders
Browse files Browse the repository at this point in the history
  • Loading branch information
hantangwangd authored and tdcmeehan committed Nov 4, 2024
1 parent 6cfa327 commit 991791d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void readNext(long[] values, int offset, int length)
BinaryValuesDecoder.ValueBuffer valueBuffer = delegate.readNext(length);
int bufferSize = valueBuffer.getBufferSize();
byte[] byteBuffer = new byte[bufferSize];
int[] offsets = new int[bufferSize + 1];
int[] offsets = new int[length + 1];
delegate.readIntoBuffer(byteBuffer, 0, offsets, 0, valueBuffer);

for (int i = 0; i < length; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void readNext(long[] values, int offset, int length)
ValueBuffer valueBuffer = delegate.readNext(length);
int bufferSize = valueBuffer.getBufferSize();
byte[] byteBuffer = new byte[bufferSize];
int[] offsets = new int[bufferSize + 1];
int[] offsets = new int[length + 1];
delegate.readIntoBuffer(byteBuffer, 0, offsets, 0, valueBuffer);

for (int i = 0; i < length; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void readNext(long[] values, int offset, int length)
ValueBuffer valueBuffer = delegate.readNext(length);
int bufferSize = valueBuffer.getBufferSize();
byte[] byteBuffer = new byte[bufferSize];
int[] offsets = new int[bufferSize + 1];
int[] offsets = new int[length + 1];
delegate.readIntoBuffer(byteBuffer, 0, offsets, 0, valueBuffer);

for (int i = 0; i < length; i++) {
Expand Down

0 comments on commit 991791d

Please sign in to comment.