wgtmac commented on code in PR #34327:
URL: https://github.com/apache/arrow/pull/34327#discussion_r1117100117


##########
cpp/src/parquet/column_writer.cc:
##########
@@ -1362,7 +1375,7 @@ class TypedColumnWriterImpl : public ColumnWriterImpl, 
public TypedColumnWriter<
           *out_spaced_values_to_write +=
               def_levels[x] >= level_info_.repeated_ancestor_def_level ? 1 : 0;
         }
-        *null_count = *out_values_to_write - *out_spaced_values_to_write;
+        *null_count = batch_size - *out_values_to_write;

Review Comment:
   If this line does not change, the test cases 
`StatsTests::ParameterizedStatisticsTest` in the `arrow_statistics_test.cc` 
simply fail due to incorrect null_count. Here is why:
   - `out_values_to_write`: number of non-null values only
   - `out_spaced_values_to_write`: number of non-null values and null values
   - `batch_size`: number of all values including non-null values, null values, 
and empty list (which is null from ancestor)



-- 
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]

Reply via email to