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

Function physical_exprs_contains

datafusion/physical-expr/src/physical_expr.rs:55–62  ·  view source on GitHub ↗

This function is similar to the `contains` method of `Vec`. It finds whether `expr` is among `physical_exprs`.

(
    physical_exprs: &[Arc<dyn PhysicalExpr>],
    expr: &Arc<dyn PhysicalExpr>,
)

Source from the content-addressed store, hash-verified

53/// This function is similar to the `contains` method of `Vec`. It finds
54/// whether `expr` is among `physical_exprs`.
55pub fn physical_exprs_contains(
56 physical_exprs: &[Arc<dyn PhysicalExpr>],
57 expr: &Arc<dyn PhysicalExpr>,
58) -> bool {
59 physical_exprs
60 .iter()
61 .any(|physical_expr| physical_expr.eq(expr))
62}
63
64/// Checks whether the given physical expression slices are equal.
65pub fn physical_exprs_equal(

Callers 1

get_aggregate_expr_reqFunction · 0.85

Calls 3

anyMethod · 0.45
iterMethod · 0.45
eqMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…