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

Method evaluate

arrow-string/src/binary_predicate.rs:37–43  ·  view source on GitHub ↗

Evaluate this predicate against the given haystack

(&self, haystack: &[u8])

Source from the content-addressed store, hash-verified

35
36 /// Evaluate this predicate against the given haystack
37 pub fn evaluate(&self, haystack: &[u8]) -> bool {
38 match self {
39 Self::Contains(finder) => finder.find(haystack).is_some(),
40 Self::StartsWith(v) => starts_with(haystack, v, equals_kernel),
41 Self::EndsWith(v) => ends_with(haystack, v, equals_kernel),
42 }
43 }
44
45 /// Evaluate this predicate against the elements of `array`
46 ///

Callers

nothing calls this directly

Calls 3

findMethod · 0.80
starts_withFunction · 0.70
ends_withFunction · 0.70

Tested by

no test coverage detected