Skip to content

Commit

Permalink
Make sure benchmark can run multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
pitrou committed Jun 12, 2024
1 parent ab6d711 commit e88e940
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cpp/src/parquet/encoding_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1233,12 +1233,11 @@ class BenchmarkDecodeArrowByteArray : public BenchmarkDecodeArrowBase<ByteArrayT
valid_bits_ = input_array_->null_bitmap_data();
total_size_ = input_array_->data()->buffers[2]->size();

values_.reserve(num_values_);
values_.resize(num_values_);
const auto& binary_array = static_cast<const ::arrow::BinaryArray&>(*input_array_);
for (int64_t i = 0; i < binary_array.length(); i++) {
auto view = binary_array.GetView(i);
values_.emplace_back(static_cast<uint32_t>(view.length()),
reinterpret_cast<const uint8_t*>(view.data()));
values_[i] = view;
}
}

Expand Down

0 comments on commit e88e940

Please sign in to comment.