anoopj commented on code in PR #3483:
URL: https://github.com/apache/iceberg-rust/pull/3483#discussion_r4332101838


##########
crates/iceberg/src/expr/visitors/inclusive_metrics_evaluator.rs:
##########
@@ -129,6 +130,16 @@ impl<'a> InclusiveMetricsEvaluator<'a> {
 
         ROWS_MIGHT_MATCH
     }
+
+    /// Widens a stored bound to the reference's type so a bound written under 
a
+    /// narrower type (e.g. an `int` column later promoted to `long`) compares
+    /// against a predicate bound to the wider type.
+    fn promote_bound(bound: &Datum, reference: &BoundReference) -> Datum {
+        match reference.field().field_type.as_primitive_type() {
+            Some(primitive_type) => bound.promote_to(primitive_type),
+            None => bound.clone(),
+        }
+    }

Review Comment:
   Good catch, applied. 



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

Reply via email to