Function arrow::compute::kernels::comparison::like_utf8 [−][src]
pub fn like_utf8<OffsetSize: StringOffsetSizeTrait>(
left: &GenericStringArray<OffsetSize>,
right: &GenericStringArray<OffsetSize>
) -> Result<BooleanArray>
Expand description
Perform SQL left LIKE right
operation on StringArray
/ LargeStringArray
.
There are two wildcards supported with the LIKE operator:
%
- The percent sign represents zero, one, or multiple characters_
- The underscore represents a single character
For example:
use arrow::array::{StringArray, BooleanArray}; use arrow::compute::like_utf8; let strings = StringArray::from(vec!["Arrow", "Arrow", "Arrow", "Ar"]); let patterns = StringArray::from(vec!["A%", "B%", "A.", "A."]); let result = like_utf8(&strings, &patterns).unwrap(); assert_eq!(result, BooleanArray::from(vec![true, false, false, true]));