Skip to content
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

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

Closed
wants to merge 3 commits into from

Conversation

lidavidm
Copy link
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 link
Contributor

@cyb70289 cyb70289 left a comment

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
Member Author

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
Member Author

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
Member Author

Rebased and fixed conflicts.

@ianmcook
Copy link
Member

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

@lidavidm
Copy link
Member Author

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

@cyb70289 cyb70289 closed this in 022dd63 May 22, 2021
@lidavidm lidavidm deleted the arrow-12717 branch May 25, 2021 14:14
michalursa pushed a commit to michalursa/arrow that referenced this pull request Jun 13, 2021
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.

Closes apache#10353 from lidavidm/arrow-12717

Authored-by: David Li <li.davidm96@gmail.com>
Signed-off-by: Yibo Cai <yibo.cai@arm.com>
Sign up for free to 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.

None yet

3 participants