Skip to content

ARROW-12949: [C++] Add starts_with and ends_with - #10448

Closed
lidavidm wants to merge 6 commits into
apache:masterfrom
lidavidm:arrow-12949
Closed

ARROW-12949: [C++] Add starts_with and ends_with#10448
lidavidm wants to merge 6 commits into
apache:masterfrom
lidavidm:arrow-12949

Conversation

@lidavidm

Copy link
Copy Markdown
Member

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.

@github-actions

Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
MemberAuthor

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

@pitroupitrou left a comment

Copy link
Copy Markdown
Member

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?

Comment threadcpp/src/arrow/compute/kernels/scalar_string.cc Outdated
Comment threadcpp/src/arrow/compute/kernels/scalar_string.cc Outdated
Comment threadcpp/src/arrow/compute/kernels/scalar_string.cc Outdated
Comment threadcpp/src/arrow/compute/kernels/scalar_string.cc Outdated
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@lidavidm@pitrou@cyb70289