-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix Regex signature types #12690
base: main
Are you sure you want to change the base?
Fix Regex signature types #12690
Conversation
Thanks @blaginin, for working on this! There are some TODO items related to this issue. Could you help address them?
You can test them using the following command
|
Thank you @blaginin and @goldmedal for the review. Sounds like this PR is quite close ❤️ |
Thanks for the review, @goldmedal! I've uncommented your tests and also added flags testing. Quite a cool string test setup, by the way! ;) |
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 great to me -- thank you @blaginin and @goldmedal 🏆
Which issue does this PR close?
Closes #12664.
Rationale for this change
As pointed out in the original issue,
REGEX_MATCH
andREGEX_LIKE
fail if the first argument isLargeUtf8
but the second (or third) argument isUtf8
. We were performingas_generic_string_array::<i64>
on&GenericStringArray<i32>
, which caused the issue.What changes are included in this PR?
Regex Match implementation in Apache Arrow requires the input and patterns to have the same type, and the flags to have the same type as well. I have reflected this change in the function signatures.
Are these changes tested?
Yes, by
string_query.slt.part
Are there any user-facing changes?
No, only a bugfix.