Function datafusion_physical_expr::analysis::analyze
source · pub fn analyze(
expr: &Arc<dyn PhysicalExpr>,
context: AnalysisContext,
schema: &Schema,
) -> Result<AnalysisContext>
Expand description
Attempts to refine column boundaries and compute a selectivity value.
The function accepts boundaries of the input columns in the context
parameter.
It then tries to tighten these boundaries based on the provided expr
.
The resulting selectivity value is calculated by comparing the initial and final boundaries.
The computation assumes that the data within the column is uniformly distributed and not sorted.
§Arguments
context
- The context holding input column boundaries.expr
- The expression used to shrink the column boundaries.
§Returns
AnalysisContext
constructed by pruned boundaries and a selectivity value.