We already have code that it generic over Utf8 and LargeUtf8, so it should mostly be a matter to findings the places where we match on those and add cases for StringView.
Examples:
|
pub fn iter_str_array(arr: &dyn Array) -> Box<dyn Iterator<Item = Option<&str>> + Send + '_> { |
|
match arr.data_type() { |
|
DataType::Utf8 => Box::new(arr.as_string::<i32>().iter()), |
|
DataType::LargeUtf8 => Box::new(arr.as_string::<i64>().iter()), |
|
_ => panic!("Expecting Utf8 or LargeUtf8, found {:?}", arr.data_type()), |
|
} |
|
} |
|
DataType::Utf8 | DataType::LargeUtf8 => {} |
We already have code that it generic over Utf8 and LargeUtf8, so it should mostly be a matter to findings the places where we match on those and add cases for StringView.
Examples:
lance/rust/lance-arrow/src/lib.rs
Lines 470 to 476 in 11eeb29
lance/rust/lance-index/src/scalar/inverted/index.rs
Line 7966 in 11eeb29