mapleFU commented on code in PR #35989:
URL: https://github.com/apache/arrow/pull/35989#discussion_r1252200622
##########
cpp/src/parquet/statistics.cc:
##########
@@ -552,12 +556,17 @@ class TypedStatisticsImpl : public TypedStatistics<DType>
{
void Merge(const TypedStatistics<DType>& other) override {
this->num_values_ += other.num_values();
+ // Merge always runs when Merge builder's page statistics
+ // into column chunk statistics, so it usually has null count.
Review Comment:
I know what you mean. This is a bit confusing:
1. `IncrementNullCount` will set `has_null_count_` to true ( but I think
it's not neccessary ). The `page_statistics_` would call `IncrementNullCount`
to set it( although at the first time `has_null_count_` would be true for it
2. `chunk_statistics_` will only call `merge`, once it meets a `Statistics`
without `has_null_count_`, it's `has_null_count_` would never be true.
##########
cpp/src/parquet/statistics.cc:
##########
@@ -552,12 +556,17 @@ class TypedStatisticsImpl : public TypedStatistics<DType>
{
void Merge(const TypedStatistics<DType>& other) override {
this->num_values_ += other.num_values();
+ // Merge always runs when Merge builder's page statistics
+ // into column chunk statistics, so it usually has null count.
Review Comment:
I know what you mean. This is a bit confusing:
1. `IncrementNullCount` will set `has_null_count_` to true ( but I think
it's not neccessary ). The `page_statistics_` would call `IncrementNullCount`
to set it( although at the first time `has_null_count_` would be true for it)
2. `chunk_statistics_` will only call `merge`, once it meets a `Statistics`
without `has_null_count_`, it's `has_null_count_` would never be true.
--
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]