MCPcopy Create free account
hub / github.com/apache/arrow-rs / op_scalar

Function op_scalar

arrow-string/src/binary_like.rs:110–126  ·  view source on GitHub ↗
(
    op: Op,
    l: T,
    l_v: Option<&dyn AnyDictionaryArray>,
    r: &[u8],
)

Source from the content-addressed store, hash-verified

108
109#[inline(never)]
110fn op_scalar<'a, T: BinaryArrayType<'a>>(
111 op: Op,
112 l: T,
113 l_v: Option<&dyn AnyDictionaryArray>,
114 r: &[u8],
115) -> Result<BooleanArray, ArrowError> {
116 let r = match op {
117 Op::Contains => BinaryPredicate::contains(r).evaluate_array(l, false),
118 Op::StartsWith => BinaryPredicate::StartsWith(r).evaluate_array(l, false),
119 Op::EndsWith => BinaryPredicate::EndsWith(r).evaluate_array(l, false),
120 };
121
122 Ok(match l_v {
123 Some(v) => take(&r, v.keys(), None)?.as_boolean().clone(),
124 None => r,
125 })
126}
127
128fn vectored_iter<'a, T: BinaryArrayType<'a> + 'a>(
129 a: T,

Callers

nothing calls this directly

Calls 6

containsFunction · 0.85
takeFunction · 0.85
evaluate_arrayMethod · 0.45
cloneMethod · 0.45
as_booleanMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected