-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add regexp_extract func #14282
base: main
Are you sure you want to change the base?
Add regexp_extract func #14282
Conversation
} | ||
|
||
fn regexp_extract<T: OffsetSizeTrait>(args: &[ArrayRef]) -> Result<ArrayRef> { | ||
let target = as_generic_string_array::<T>(&args[0])?; |
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.
I'd have to check but I don't think this would work with DataType::Utf8View. Could some sql tests be added that cover all the possible input types?
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.
I've added one more sql test and according to its result it works
Thanks for your contribution! I've left some comments for your review. |
Which issue does this PR close?
Closes #14280.
Rationale for this change
Adding more functions
What changes are included in this PR?
The implementation of regexp_extract based on Spark regexp_extract
Are these changes tested?
Yes
Are there any user-facing changes?
No