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

regexp_match does not support Utf8View #13357

Closed
Omega359 opened this issue Nov 11, 2024 · 3 comments
Closed

regexp_match does not support Utf8View #13357

Omega359 opened this issue Nov 11, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Omega359
Copy link
Contributor

Describe the bug

regexp match's signature:

 // TODO: Native support Utf8View for regexp_match.
                    TypeSignature::Exact(vec![Utf8, Utf8]),
                    TypeSignature::Exact(vec![LargeUtf8, LargeUtf8]),
                    TypeSignature::Exact(vec![Utf8, Utf8, Utf8]),
                    TypeSignature::Exact(vec![LargeUtf8, LargeUtf8, LargeUtf8]),

This udf should be updated to include support for Utf8View. The type signature might want to be updated to use the new TypeSignature::String (see #13301)

To Reproduce

Add the following to the string view tests in regexp.slt

SELECT regexp_match(str, 'a.*', 'i') from t;

This will require #13348 to be in place to test the binary express equivalent

Expected behavior

Test passes, explain of plan verifies that no type coercion occurred to force Utf8View to Utf8

Additional context

No response

@Omega359 Omega359 added the bug Something isn't working label Nov 11, 2024
@Omega359
Copy link
Contributor Author

A good part of the reason why this hasn't been done in DF is that the corresponding functions in arrow-rs do not support StringView - https://github.com/apache/arrow-rs/blob/28878d375c5bb1c2f5adb46b287e16cea768b6e7/arrow-string/src/regexp.rs#L400

The regexp_is_match* functions were updated as part of apache/arrow-rs#6370 / apache/arrow-rs#6376 by @lamb (ticket and review) and @tlm365 (code update) - we will need to file a similar ticket for regexp_match as well

@Omega359
Copy link
Contributor Author

This ticket is a duplicate of #11911

@Omega359
Copy link
Contributor Author

Closing as a duplicate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant