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

Function conjunction

datafusion/physical-expr/src/utils/mod.rs:112–116  ·  view source on GitHub ↗

Create a conjunction of the given predicates. If the input is empty, return a literal true. If the input contains a single predicate, return the predicate. Otherwise, return a conjunction of the predicates (e.g. `a AND b AND c`).

(
    predicates: impl IntoIterator<Item = Arc<dyn PhysicalExpr>>,
)

Source from the content-addressed store, hash-verified

110/// If the input contains a single predicate, return the predicate.
111/// Otherwise, return a conjunction of the predicates (e.g. `a AND b AND c`).
112pub fn conjunction(
113 predicates: impl IntoIterator<Item = Arc<dyn PhysicalExpr>>,
114) -> Arc<dyn PhysicalExpr> {
115 conjunction_opt(predicates).unwrap_or_else(|| crate::expressions::lit(true))
116}
117
118/// Create a conjunction of the given predicates.
119/// If the input is empty or the return None.

Calls 2

conjunction_optFunction · 0.85
litFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…