-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-12949: [C++] Add starts_with and ends_with #10448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what this comment means. Looks there's no template around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean L612-L653 below which are partial template specializations that convert a case-insensitive prefix/suffix match into an equivalent regex (to avoid having to do Unicode case folding ourselves): https://github.com/apache/arrow/pull/10448/files#diff-eb8300bc4dea7d1c46b2576b7dbd8e42b927ab7d42c031f4aecae892a72ee244R612-R653
pitrou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Can you also update docs/source/cpp/compute.rst?
This adds a simple starts_with and ends_with.
Also, now match_like can optimize some patterns into prefix/suffix matches. This also fixes a bug (which I believe is also present in Apache Impala) where some LIKE patterns are mistakenly optimized into suffix or substring matches.