sdd commented on code in PR #558: URL: https://github.com/apache/iceberg-rust/pull/558#discussion_r1735144793
########## crates/iceberg/src/expr/visitors/row_group_metrics_evaluator.rs: ########## @@ -140,21 +140,79 @@ impl<'a> RowGroupMetricsEvaluator<'a> { return Ok(None); }; - Ok(Some(Datum::try_from_bytes( - stats.min_bytes(), - primitive_type, - )?)) + if !stats.has_min_max_set() { + return Ok(None); + } + + Ok(Some(match (primitive_type, stats) { + (PrimitiveType::Boolean, Statistics::Boolean(stats)) => Datum::bool(*stats.min()), Review Comment: Done - I managed to unify the code for both min and max as well by using a macro. See https://github.com/apache/iceberg-rust/pull/558/commits/a3b3c8a670b923c0d9f77890ae8672480a493581 -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org