pitrou commented on a change in pull request #11756:
URL: https://github.com/apache/arrow/pull/11756#discussion_r754389033
##########
File path: cpp/src/parquet/encoding.cc
##########
@@ -2461,31 +2464,31 @@ class DeltaByteArrayDecoder : public DecoderImpl,
typename EncodingTraits<ByteArrayType>::Accumulator*
out,
int* out_num_values) {
ArrowBinaryHelper helper(out);
- ::arrow::internal::BitmapReader bit_reader(valid_bits, valid_bits_offset,
num_values);
std::vector<ByteArray> values(num_values);
- int num_valid_values = GetInternal(values.data(), num_values - null_count);
+ const int num_valid_values = GetInternal(values.data(), num_values -
null_count);
DCHECK_EQ(num_values - null_count, num_valid_values);
auto values_ptr = reinterpret_cast<const ByteArray*>(values.data());
int value_idx = 0;
- for (int i = 0; i < num_values; ++i) {
- bool is_valid = bit_reader.IsSet();
- bit_reader.Next();
+ RETURN_NOT_OK(VisitNullBitmapInline(
Review comment:
Note this gracefully handles the case where there is no null bitmap
since there are no nulls. It may also be significantly faster ;-)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]