vortex_array/expr/pruning/
mod.rs

1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright the Vortex contributors
3
4mod pruning_expr;
5mod relation;
6
7pub use pruning_expr::RequiredStats;
8pub use pruning_expr::checked_pruning_expr;
9pub use pruning_expr::field_path_stat_field_name;
10pub use relation::Relation;
11use vortex_dtype::FieldPath;
12
13use crate::expr::Expression;
14use crate::expr::stats::Stat;
15
16/// A catalog of available stats that are associated with field paths.
17pub trait StatsCatalog {
18    /// Given a field path and statistic, return an expression that when evaluated over the catalog
19    /// will return that stat for the referenced field.
20    ///
21    /// This is likely to be a column expression, or a literal.
22    ///
23    /// Returns `None` if the stat is not available for the field path.
24    fn stats_ref(&self, _field_path: &FieldPath, _stat: Stat) -> Option<Expression> {
25        None
26    }
27}