pub fn split_conjunction_owned(expr: Expr) -> Vec<Expr>
Expand description

Splits an owned conjunctive Expr such as A AND B AND C => [A, B, C]

This is often used to “split” filter expressions such as col1 = 5 AND col2 = 10 into [col1 = 5, col2 = 10];

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 split_conjunction_owned to split them
assert_eq!(split_conjunction_owned(expr), split);