Skip to content

Commit

Permalink
Revert decoder change
Browse files Browse the repository at this point in the history
  • Loading branch information
mapleFU committed Jan 30, 2024
1 parent f156149 commit dc567e8
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions cpp/src/parquet/encoding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2414,11 +2414,7 @@ class DeltaBitPackDecoder : public DecoderImpl, virtual public TypedDecoder<DTyp
void SetData(int num_values, const uint8_t* data, int len) override {
// num_values is equal to page's num_values, including null values in this page
this->num_values_ = num_values;
if (decoder_ == nullptr) {
decoder_ = std::make_shared<::arrow::bit_util::BitReader>(data, len);
} else {
decoder_->Reset(data, len);
}
decoder_ = std::make_shared<::arrow::bit_util::BitReader>(data, len);
InitHeader();
}

Expand Down Expand Up @@ -2777,11 +2773,7 @@ class DeltaLengthByteArrayDecoder : public DecoderImpl,

void SetData(int num_values, const uint8_t* data, int len) override {
DecoderImpl::SetData(num_values, data, len);
if (decoder_ == nullptr) {
decoder_ = std::make_shared<::arrow::bit_util::BitReader>(data, len);
} else {
decoder_->Reset(data, len);
}
decoder_ = std::make_shared<::arrow::bit_util::BitReader>(data, len);
DecodeLengths();
}

Expand Down

0 comments on commit dc567e8

Please sign in to comment.