-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-12134: [C++] Add match_substring_regex kernel #9838
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.
There's no conceptual reason for matchers to be templated on offset type. The iteration loop on string values could be moved out of the matcher and into the calling MatchSubstring class. Then all a matcher does is take a string_view or similar and return the index where the pattern was found (or presumably -1 if not found).
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.
Got it, I refactored that part. The Knuth-Morris-Pratt implementation also had to be refactored as it was templated on offset_type, though it seems that was unnecessary.
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.
LGTM, one last nit
docs/source/cpp/compute.rst
Outdated
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.
You missed the renumbering of notes here (and below).
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.
LGTM, +1
Oops, forget to check the CI.
|
It looks like there's a failure on Windows in debug mode (see CI): |
|
It's reproducible on Linux by temporarily using .at() for array access. I incorrectly turned |
|
This should be ready again (minus RTools 3.5/JNI which are known to be failing/flaky). |
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.
+1, LGTM
For consistency with match_substring, this is the equivalent of Python's re.search(), not re.match(). Closes apache#9838 from lidavidm/arrow-12134 Authored-by: David Li <li.davidm96@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>
For consistency with match_substring, this is the equivalent of Python's re.search(), not re.match().