MCPcopy Create free account
hub / github.com/apache/datafusion / split_conjunction_owned

Function split_conjunction_owned

datafusion/expr/src/utils.rs:1107–1109  ·  view source on GitHub ↗

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 ``` # use datafusion_expr::{col, lit}; # use datafusion_expr::utils::split_conjunction_owned; // 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![

(expr: Expr)

Source from the content-addressed store, hash-verified

1105/// assert_eq!(split_conjunction_owned(expr), split);
1106/// ```
1107pub fn split_conjunction_owned(expr: Expr) -> Vec<Expr> {
1108 split_binary_owned(expr, Operator::And)
1109}
1110
1111/// Splits an owned binary operator tree [`Expr`] such as `A <OP> B <OP> C` => `[A, B, C]`
1112///

Callers 6

read_with_schemaFunction · 0.85
rewriteMethod · 0.85
push_down_joinFunction · 0.85
rewriteMethod · 0.85

Calls 1

split_binary_ownedFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…