Skip to content

Commit

Permalink
Fix the length of offsets array in parquet long decimal value decoders
Browse files Browse the repository at this point in the history
  • Loading branch information
hantangwangd committed Oct 7, 2024
1 parent 88c03ab commit 6f60355
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 @@ -49,7 +49,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 @@ -45,7 +45,7 @@ public void readNext(long[] values, int offset, int length)
PlainValueBuffer valueBuffer = (PlainValueBuffer) 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 @@ -46,7 +46,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 6f60355

Please sign in to comment.