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

Function conjunction

datafusion/expr/src/utils.rs:1198–1200  ·  view source on GitHub ↗

Combines an array of filter expressions into a single filter expression consisting of the input filter expressions joined with logical AND. Returns None if the filters array is empty. # Example ``` # use datafusion_expr::{col, lit}; # use datafusion_expr::utils::conjunction; // 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)

(filters: impl IntoIterator<Item = Expr>)

Source from the content-addressed store, hash-verified

1196/// assert_eq!(conjunction(split), Some(expr));
1197/// ```
1198pub fn conjunction(filters: impl IntoIterator<Item = Expr>) -> Option<Expr> {
1199 filters.into_iter().reduce(Expr::and)
1200}
1201
1202/// Combines an array of filter expressions into a single filter
1203/// expression consisting of the input filter expressions joined with

Callers 15

test_conjunctionFunction · 0.70
filters_to_predicateMethod · 0.50
scanMethod · 0.50
scanMethod · 0.50
single_fileFunction · 0.50
runMethod · 0.50
filter_partitionsFunction · 0.50
from_table_scanFunction · 0.50
try_pushdown_filtersMethod · 0.50
rewriteMethod · 0.50
build_joinFunction · 0.50
push_down_all_joinFunction · 0.50

Calls 1

into_iterMethod · 0.45

Tested by 3

test_conjunctionFunction · 0.56
single_fileFunction · 0.40
runMethod · 0.40

Used in the wild real call sites across dependent graphs

searching dependent graphs…