Skip to content

regexp_match does not support Utf8View #13357

Closed

Description

@Omega359

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

Activity

  1. Omega359 commented on Nov 11, 2024

    @Omega359
    ContributorAuthor

    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

  2. Omega359 commented on Nov 11, 2024

    @Omega359
    ContributorAuthor

    This ticket is a duplicate of #11911

  3. Omega359 commented on Nov 11, 2024

    @Omega359
    ContributorAuthor

    Closing as a duplicate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions