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
disjunction in datafusion_expr::utils - Rust
[go: Go Back, main page]

Function disjunction

Source
pub fn disjunction(filters: impl IntoIterator<Item = Expr>) -> Option<Expr>
Expand description

Combines an array of filter expressions into a single filter expression consisting of the input filter expressions joined with logical OR.

Returns None if the filters array is empty.

ยงExample

// a=1 OR b=2
let expr = col("a").eq(lit(1)).or(col("b").eq(lit(2)));

// [a=1, b=2]
let split = vec![
  col("a").eq(lit(1)),
  col("b").eq(lit(2)),
];

// use disjunction to join them together with `OR`
assert_eq!(disjunction(split), Some(expr));