Function datafusion_optimizer::utils::conjunction
source · pub fn conjunction(filters: impl IntoIterator<Item = Expr>) -> Option<Expr>
👎Deprecated since 34.0.0: use
datafusion_expr::utils::conjunction
insteadExpand description
Combines an array of filter expressions into a single filter expression consisting of the input filter expressions joined with logical AND.
Returns None if the filters array is empty.
§Example
// a=1 AND b=2
let expr = col("a").eq(lit(1)).and(col("b").eq(lit(2)));
// [a=1, b=2]
let split = vec![
col("a").eq(lit(1)),
col("b").eq(lit(2)),
];
// use conjunction to join them together with `AND`
assert_eq!(conjunction(split), Some(expr));