Struct datafusion_physical_expr::ExprBoundaries
source · pub struct ExprBoundaries {
pub min_value: ScalarValue,
pub max_value: ScalarValue,
pub distinct_count: Option<usize>,
pub selectivity: Option<f64>,
}
Expand description
Represents the boundaries of the resulting value from a physical expression, if it were to be an expression, if it were to be evaluated.
Fields§
§min_value: ScalarValue
Minimum value this expression’s result can have.
max_value: ScalarValue
Maximum value this expression’s result can have.
distinct_count: Option<usize>
Maximum number of distinct values this expression can produce, if known.
selectivity: Option<f64>
The estimated percantage of rows that this expression would select, if it were to be used as a boolean predicate on a filter. The value will be between 0.0 (selects nothing) and 1.0 (selects everything).
Implementations§
source§impl ExprBoundaries
impl ExprBoundaries
sourcepub fn new(
min_value: ScalarValue,
max_value: ScalarValue,
distinct_count: Option<usize>
) -> Self
pub fn new(
min_value: ScalarValue,
max_value: ScalarValue,
distinct_count: Option<usize>
) -> Self
Create a new ExprBoundaries
.
sourcepub fn new_with_selectivity(
min_value: ScalarValue,
max_value: ScalarValue,
distinct_count: Option<usize>,
selectivity: Option<f64>
) -> Self
pub fn new_with_selectivity(
min_value: ScalarValue,
max_value: ScalarValue,
distinct_count: Option<usize>,
selectivity: Option<f64>
) -> Self
Create a new ExprBoundaries
with a selectivity value.
sourcepub fn from_column(column: &ColumnStatistics) -> Option<Self>
pub fn from_column(column: &ColumnStatistics) -> Option<Self>
Create a new ExprBoundaries
from a column level statistics.
sourcepub fn reduce(&self) -> Option<ScalarValue>
pub fn reduce(&self) -> Option<ScalarValue>
Try to reduce the boundaries into a single scalar value, if possible.
Trait Implementations§
source§impl Clone for ExprBoundaries
impl Clone for ExprBoundaries
source§fn clone(&self) -> ExprBoundaries
fn clone(&self) -> ExprBoundaries
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more