-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: optional args for regexp_* UDFs #10514
Merged
Merged
Conversation
This file contains 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
…acro This does not change any functionality but enables adding optional arguments to each fn.
This also updates the argument names to match what is used in the inner impl. Ref apache#10512
This also updates the argument names to match the inner impl. Ref apache#10512
This also updates the argument names to match the inner impl. Ref apache#10512
Requesting review from @jayzhan211 and @jonahgao |
1 task
jonahgao
reviewed
May 15, 2024
jonahgao
reviewed
May 15, 2024
jonahgao
approved these changes
May 15, 2024
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.
Looks good to me! Thank you @Michael-J-Ward
findepi
pushed a commit
to findepi/datafusion
that referenced
this pull request
Jul 16, 2024
* refactor: declare `regex::expr_fn`s explicitly instead of using the macro This does not change any functionality but enables adding optional arguments to each fn. * feat: make `flag` argument optional for expr_fn::regexp_replace This also updates the argument names to match what is used in the inner impl. Ref apache#10512 * feat: add optional `flags` argument to expr_fn::regexp_match This also updates the argument names to match the inner impl. Ref apache#10512 * feat: add optional `flags` argument to expr_fn::regexp_like This also updates the argument names to match the inner impl. Ref apache#10512 * docs: clean up doc comments for expr_fn::regexp_* * refactor: use datafusion_expr::Expr declaration
This was referenced Aug 7, 2024
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?
Closes #10512
Rationale for this change
The inner implementations of these UDFs depend on the number of arguments passed. This exposes that to users of the UDFs.
What changes are included in this PR?
for each of
regexp_match
regexp_likeand
regexp_replace`Are these changes tested?
Yes. Each function already had a test case, and were updated to include variants for the optional arguments.
Are there any user-facing changes?
Yes.
expr_fn::regexp_replace
signature has changedexpr_fn::regexp_like
signature has changedexpr_fn::regexp_match
signature has changed