Michael-J-Ward commented on code in PR #6216: URL: https://github.com/apache/arrow-rs/pull/6216#discussion_r1716983500
########## parquet/src/file/statistics.rs: ########## @@ -246,11 +245,7 @@ pub fn to_thrift(stats: Option<&Statistics>) -> Option<TStatistics> { let mut thrift_stats = TStatistics { max: None, min: None, - null_count: if stats.has_nulls() { - Some(stats.null_count() as i64) - } else { - None - }, + null_count: stats.null_count_opt().map(|value| value as i64), Review Comment: @alamb - this is why the `arrow_writer_layout` tests changed. The previous API treated `null_count = 0` as None. The new API treats `null_count = 0` as `Some(0)`. I believe the new behavior is what is desired, but can easily revert to the old behavior with: ``` null_count: stats.null_count_opt().map(|value| value as i64).filter(|&x| x > 0), ``` -- 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