xinlifoobar commented on code in PR #6231:
URL: https://github.com/apache/arrow-rs/pull/6231#discussion_r1718479077
##########
arrow-string/src/like.rs:
##########
@@ -155,9 +156,27 @@ fn like_op(op: Op, lhs: &dyn Datum, rhs: &dyn Datum) ->
Result<BooleanArray, Arr
///
/// This trait helps to abstract over the different types of string arrays
/// so that we don't need to duplicate the implementation for each type.
-trait StringArrayType<'a>: ArrayAccessor<Item = &'a str> + Sized {
+pub(crate) trait StringArrayType<'a>: ArrayAccessor<Item = &'a str> + Sized {
fn is_ascii(&self) -> bool;
fn iter(&self) -> ArrayIter<Self>;
+
+ /// Returns whether the array is optimized for prefix search
Review Comment:
I updated the code to allow variable length of prefixes. However, based on
the bench result, the optimization only works when the prefix is located on the
first chunk, 4/12 bytes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]