Skip to content

Commit

Permalink
update the allocation length
Browse files Browse the repository at this point in the history
  • Loading branch information
mapleFU committed Nov 23, 2023
1 parent 5f12876 commit 51e6fb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/src/parquet/encoding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1921,7 +1921,7 @@ class DictByteArrayDecoderImpl : public DictDecoderImpl<ByteArrayType>,
constexpr int32_t kBufferSize = 1024;
int32_t indices[kBufferSize];

ArrowBinaryHelper<ByteArrayType> helper(out, num_values);
ArrowBinaryHelper<ByteArrayType> helper(out, std::min(num_values, this->num_values_));
// The `len_` in the ByteArrayDictDecoder is the total length of the
// RLE/Bit-pack encoded data size, so, we cannot use `len_` to reserve
// space for binary data.
Expand Down Expand Up @@ -1992,7 +1992,7 @@ class DictByteArrayDecoderImpl : public DictDecoderImpl<ByteArrayType>,
int32_t indices[kBufferSize];
int values_decoded = 0;

ArrowBinaryHelper<ByteArrayType> helper(out, num_values);
ArrowBinaryHelper<ByteArrayType> helper(out, std::min(num_values, this->num_values_));
// The `len_` in the ByteArrayDictDecoder is the total length of the
// RLE/Bit-pack encoded data size, so, we cannot use `len_` to reserve
// space for binary data.
Expand Down

0 comments on commit 51e6fb7

Please sign in to comment.