Expand description
Interval and selectivity in AnalysisContext
Structs§
- Analysis
Context - The shared context used during the analysis of an expression. Includes the boundaries for all known columns.
- Expr
Boundaries - Represents the boundaries (e.g. min and max values) of a particular column
Functions§
- analyze
- Attempts to refine column boundaries and compute a selectivity value.
- calculate_
selectivity 🔒 - This function calculates the filter predicate’s selectivity by comparing the initial and pruned column boundaries. Selectivity is defined as the ratio of rows in a table that satisfy the filter’s predicate.
- shrink_
boundaries 🔒 - If the
PropagationResultindicates success, this function calculates the selectivity value by comparing the initial and final column boundaries. Following this, it constructs and returns a newAnalysisContextwith the updated parameters.