pub fn analyze(
    expr: &Arc<dyn PhysicalExpr>,
    context: AnalysisContext
) -> 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.