pitrou commented on code in PR #43726: URL: https://github.com/apache/arrow/pull/43726#discussion_r1745776051
########## cpp/src/arrow/dataset/file_parquet.cc: ########## @@ -366,8 +366,14 @@ std::optional<compute::Expression> ParquetFileFragment::EvaluateStatisticsAsExpr const parquet::Statistics& statistics) { auto field_expr = compute::field_ref(field_ref); + bool may_have_null = !statistics.HasNullCount() || statistics.null_count() > 0; // Optimize for corner case where all values are nulls - if (statistics.num_values() == 0 && statistics.null_count() > 0) { + if (statistics.num_values() == 0) { + // If `statistics.HasNullCount()`, it means the all the values are nulls. + // + // If there are no values and `!statistics.HasNullCount()`, it might be Review Comment: Does this seem ok to you @mapleFU ? It removes any discussion of `HasNullCount` which seems unrelated to this code path. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org