pitrou commented on code in PR #35989:
URL: https://github.com/apache/arrow/pull/35989#discussion_r1238749226
##########
cpp/src/parquet/metadata.cc:
##########
@@ -87,20 +87,29 @@ std::string ParquetVersionToString(ParquetVersion::type
ver) {
template <typename DType>
static std::shared_ptr<Statistics> MakeTypedColumnStats(
const format::ColumnMetaData& metadata, const ColumnDescriptor* descr) {
+ DCHECK(metadata.__isset.statistics);
+ int64_t num_non_null_values = 0;
+ if (metadata.statistics.__isset.null_count) {
+ num_non_null_values = metadata.num_values - metadata.statistics.null_count;
+ } else {
+ // NOTE: statistics should `metadata.statistics.__isset.null_count`
+ // has a invalid non-null value number.
+ num_non_null_values = metadata.num_values;
Review Comment:
Why change this? `has_null_count` will be false anyway.
--
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]