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)
| 1128 | /// assert_eq!(split_binary_owned(expr, Operator::Plus), split); |
| 1129 | /// ``` |
| 1130 | pub fn split_binary_owned(expr: Expr, op: Operator) -> Vec<Expr> { |
| 1131 | split_binary_owned_impl(expr, op, vec![]) |
| 1132 | } |
| 1133 | |
| 1134 | fn split_binary_owned_impl( |
| 1135 | expr: Expr, |
no test coverage detected
searching dependent graphs…