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

Function split_binary_owned

datafusion/expr/src/utils.rs:1130–1132  ·  view source on GitHub ↗

Splits an owned binary operator tree [`Expr`] such as `A B C` => `[A, B, C]` This is often used to "split" expressions such as `col1 = 5 AND col2 = 10` into [`col1 = 5`, `col2 = 10`]; # Example ``` # use datafusion_expr::{col, lit, Operator}; # use datafusion_expr::utils::split_binary_owned; # use std::ops::Add; // a=1 + b=2 let expr = col("a").eq(lit(1)).add(col("b").eq(lit(2))); //

(expr: Expr, op: Operator)

Source from the content-addressed store, hash-verified

1128/// assert_eq!(split_binary_owned(expr, Operator::Plus), split);
1129/// ```
1130pub fn split_binary_owned(expr: Expr, op: Operator) -> Vec<Expr> {
1131 split_binary_owned_impl(expr, op, vec![])
1132}
1133
1134fn split_binary_owned_impl(
1135 expr: Expr,

Callers 1

split_conjunction_ownedFunction · 0.85

Calls 1

split_binary_owned_implFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…