Skip to content

Commit

Permalink
apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
mapleFU committed Sep 5, 2024
1 parent b2c5e9a commit daad33e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cpp/src/arrow/dataset/file_parquet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,9 @@ std::optional<compute::Expression> 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));
}

Expand Down

0 comments on commit daad33e

Please sign in to comment.