Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
split_conjunction_owned in datafusion::optimizer::utils - Rust
[go: Go Back, main page]

Function datafusion::optimizer::utils::split_conjunction_owned

source ·
pub fn split_conjunction_owned(expr: Expr) -> Vec<Expr>
👎Deprecated since 34.0.0: use datafusion_expr::utils::split_conjunction_owned instead
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);