From daad33ef203415c8b422377822e0ca43624aa429 Mon Sep 17 00:00:00 2001 From: mwish Date: Thu, 5 Sep 2024 23:51:39 +0800 Subject: [PATCH] apply suggestions --- cpp/src/arrow/dataset/file_parquet.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cpp/src/arrow/dataset/file_parquet.cc b/cpp/src/arrow/dataset/file_parquet.cc index 8d019924b8a82..ca391b4354c07 100644 --- a/cpp/src/arrow/dataset/file_parquet.cc +++ b/cpp/src/arrow/dataset/file_parquet.cc @@ -369,11 +369,9 @@ std::optional ParquetFileFragment::EvaluateStatisticsAsExpr bool may_have_null = !statistics.HasNullCount() || statistics.null_count() > 0; // Optimize for corner case where all values are nulls 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 - // empty or all values are nulls. In this case, we also return a null - // expression. + // If there are no non-null values, column `field_ref` in the fragment + // might be empty or all values are nulls. In this case, we also return + // a null expression. return is_null(std::move(field_expr)); }