in crates/iceberg/src/expr/visitors/page_index_evaluator.rs [387:422]
fn visit_inequality(
&mut self,
reference: &BoundReference,
datum: &Datum,
cmp_fn: fn(&Datum, &Datum) -> bool,
use_lower_bound: bool,
) -> Result<RowSelection> {
let field_id = reference.field().id;
self.calc_row_selection(
field_id,
|min, max, null_count| {
if matches!(null_count, PageNullCount::AllNull) {
return Ok(false);
}
if datum.is_nan() {
// NaN indicates unreliable bounds.
return Ok(true);
}
let bound = if use_lower_bound { min } else { max };
if let Some(bound) = bound {
if cmp_fn(&bound, datum) {
return Ok(true);
}
return Ok(false);
}
Ok(true)
},
MissingColBehavior::MightMatch,
)
}