Skip to content

ARROW-12717: [C++][Python] Add find_substring kernel - #10353

Closed
lidavidm wants to merge 3 commits into
apache:masterfrom
lidavidm:arrow-12717
Closed

ARROW-12717: [C++][Python] Add find_substring kernel#10353
lidavidm wants to merge 3 commits into
apache:masterfrom
lidavidm:arrow-12717

Conversation

@lidavidm

Copy link
Copy Markdown
Member

This adds a very simple lfind kernel. If the substring is not found, -1 is reported. Nulls are propagated. Regexes are not supported, nor is rfind.

@github-actions

Copy link
Copy Markdown

@cyb70289cyb70289 left a comment

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.

LGTM, +1.
A dedicated FindSubstringOptions looks better but can be postponed when we want to implement rfind.

@lidavidm

Copy link
Copy Markdown
MemberAuthor

A thought I had is that we could/should support binary/large_binary too. And, we may want to output int32 instead of int64 for the non-large_ arrays.

@lidavidm

Copy link
Copy Markdown
MemberAuthor

Updated to support binary/large_binary and to output int32 for non-large types. I'm still postponing regex find/rfind for a different issue. Though, I'm not sure if we want rfind to be an option of this kernel or its own kernel.

@lidavidm

Copy link
Copy Markdown
MemberAuthor

Rebased and fixed conflicts.

@ianmcook

Copy link
Copy Markdown
Member

@lidavidm do you intend for this to be merged before or after #10369?

@lidavidm

Copy link
Copy Markdown
MemberAuthor

Let's merge this one first, then I'll fix up the other (though it's no big deal either way).

@lidavidm
lidavidm deleted the arrow-12717 branch May 25, 2021 14:14
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@ianmcook@cyb70289