pitrou commented on code in PR #40594:
URL: https://github.com/apache/arrow/pull/40594#discussion_r1843587710
##########
cpp/src/parquet/column_writer.cc:
##########
@@ -1708,10 +1790,15 @@ Status
TypedColumnWriterImpl<DType>::WriteArrowDictionary(
referenced_dictionary = referenced_dictionary_datum.make_array();
}
- int64_t non_null_count = chunk_indices->length() -
chunk_indices->null_count();
- page_statistics_->IncrementNullCount(num_chunk_levels - non_null_count);
- page_statistics_->IncrementNumValues(non_null_count);
- page_statistics_->Update(*referenced_dictionary, /*update_counts=*/false);
+ if (page_statistics_) {
+ int64_t non_null_count = chunk_indices->length() -
chunk_indices->null_count();
+ page_statistics_->IncrementNullCount(num_chunk_levels - non_null_count);
+ page_statistics_->IncrementNumValues(non_null_count);
+ page_statistics_->Update(*referenced_dictionary,
/*update_counts=*/false);
+ }
+ if (page_size_stats_builder_) {
+ page_size_stats_builder_->AddValues(*referenced_dictionary);
Review Comment:
Either would be fine with me, so whatever is more practical to you :-)
--
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]