Skip to content

Commit

Permalink
Don't throw in ~DictEncoderImpl()
Browse files Browse the repository at this point in the history
  • Loading branch information
Avogar committed Mar 26, 2024
1 parent ba5c679 commit 46e7ed1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cpp/src/parquet/encoding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,11 @@ class DictEncoderImpl : public EncoderImpl, virtual public DictEncoder<DType> {
dict_encoded_size_(0),
memo_table_(pool, kInitialHashTableSize) {}

~DictEncoderImpl() override { DCHECK(buffered_indices_.empty()); }
~DictEncoderImpl() override {
if (!buffered_indices_.empty()) {
ClearIndices();
}
}

int dict_encoded_size() const override { return dict_encoded_size_; }

Expand Down

0 comments on commit 46e7ed1

Please sign in to comment.