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

Function split_conjunction_impl

datafusion/expr/src/utils.rs:1023–1039  ·  view source on GitHub ↗
(expr: &'a Expr, mut exprs: Vec<&'a Expr>)

Source from the content-addressed store, hash-verified

1021}
1022
1023fn split_conjunction_impl<'a>(expr: &'a Expr, mut exprs: Vec<&'a Expr>) -> Vec<&'a Expr> {
1024 match expr {
1025 Expr::BinaryExpr(BinaryExpr {
1026 right,
1027 op: Operator::And,
1028 left,
1029 }) => {
1030 let exprs = split_conjunction_impl(left, exprs);
1031 split_conjunction_impl(right, exprs)
1032 }
1033 Expr::Alias(Alias { expr, .. }) => split_conjunction_impl(expr, exprs),
1034 other => {
1035 exprs.push(other);
1036 exprs
1037 }
1038 }
1039}
1040
1041/// Iterate parts in a conjunctive [`Expr`] such as `A AND B AND C` => `[A, B, C]`
1042///

Callers 1

split_conjunctionFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…