pub trait StatBinder {
// Required method
fn bind_aggregate(
&self,
input: &BoundExpression,
aggregate_fn: &AggregateFnRef,
stat_dtype: &DType,
) -> VortexResult<Option<BoundExpression>>;
// Provided method
fn missing_stat(&self, dtype: DType) -> VortexResult<BoundExpression> { ... }
}Expand description
A target that can bind abstract statistics to concrete expressions.
Implementations define how a pruning proof should read stats from a specific backing
representation. For example, a zone-map binder can translate a max(col) placeholder into a
field reference in the per-zone stats table, while a file-stats binder can translate the same
placeholder into a literal value from the file footer.
Required Methods§
Sourcefn bind_aggregate(
&self,
input: &BoundExpression,
aggregate_fn: &AggregateFnRef,
stat_dtype: &DType,
) -> VortexResult<Option<BoundExpression>>
fn bind_aggregate( &self, input: &BoundExpression, aggregate_fn: &AggregateFnRef, stat_dtype: &DType, ) -> VortexResult<Option<BoundExpression>>
Bind aggregate_fn(input) to a concrete expression.
Implementations should return Ok(None) when the requested aggregate
statistic is unavailable in their backing representation.
Provided Methods§
Sourcefn missing_stat(&self, dtype: DType) -> VortexResult<BoundExpression>
fn missing_stat(&self, dtype: DType) -> VortexResult<BoundExpression>
Expression to use when a stat is unavailable.
The default is a nullable null literal, which preserves three-valued pruning semantics for stats-table execution.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".