pub fn simplify_predicates(
predicates: Vec<Expr>,
) -> Result<Vec<Expr>, DataFusionError>
Expand description
Simplifies a list of predicates by removing redundancies.
This function takes a vector of predicate expressions and groups them by the column they reference.
Predicates that reference a single column and are comparison operations (e.g., >, >=, <, <=, =)
are analyzed to remove redundant conditions. For instance, x > 5 AND x > 6
is simplified to
x > 6
. Other predicates that do not fit this pattern are retained as-is.
§Arguments
predicates
- A vector ofExpr
representing the predicates to simplify.
§Returns
A Result
containing a vector of simplified Expr
predicates.