sdd commented on code in PR #558:
URL: https://github.com/apache/iceberg-rust/pull/558#discussion_r1731265175
##########
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:
Thanks - I thought this logic might exist elsewhere already but I couldn't
find it. I'll refactor for reuse.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]