pub fn explain_range_selectivity<R: TryRead>(
snap: &R,
tenant: TenantId,
where_: &Expr,
) -> Result<Option<f64>, QueryError>Expand description
Selectivity fraction (estimated owners / exact owner-occurrences,
clamped to [0.0, 1.0]) for the first range leaf (Gt/Gte/Lt/Lte)
in where_, from the value-distribution histogram — None when the predicate has no
range leaf or no usable histogram exists. This is ExplainPlan’s own
estimate channel: deliberately never merged with
explain_cardinality’s exact field.
§Errors
Returns the underlying storage error from a definition/family lookup.