feat: add regexp_instr function#1382
Merged
timsaucer merged 3 commits intoapache:mainfrom Feb 18, 2026
Merged
Conversation
The current implementation of regexp_instr in Datafusion, does not support endoption. Hence None is passed in the implementation of the function exposing it to Python.
timsaucer
approved these changes
Feb 17, 2026
Comment on lines
780
to
783
| f.regexp_instr(column("a"), literal("([lr])"), n=literal(2)), | ||
| pa.array([4, 4, 0], type=pa.int64()), | ||
| ), | ||
| ], |
Member
There was a problem hiding this comment.
I recommend adding in tests for all options. I don't expect problems here but it's come up in the past to make sure there are no mistakes along the path.
Contributor
Author
There was a problem hiding this comment.
Makes sense. Added a few more tests, with different option settings.
d05217b to
842bfea
Compare
Member
|
Nice work! Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Related to #803.
Rationale for this change
The current implementation of
regexp_instrin DataFusion does not support the end option. Hence, None is passed to the function's implementation, exposing it to Python.Additionally, fix the implementation for the optional argument start in
regexp_count.Are there any user-facing changes?
Yes, but no breaking changes.