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

Regex Match fails on Dictionary and Utf8View #12924

Closed
blaginin opened this issue Oct 14, 2024 · 5 comments
Closed

Regex Match fails on Dictionary and Utf8View #12924

blaginin opened this issue Oct 14, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@blaginin
Copy link
Contributor

Describe the bug

SELECT arrow_cast('abc', 'Utf8View') ~* arrow_cast('a.c', 'Dictionary(Int32, Utf8)'); fails on the latest build

RustRover-EAP 2024-10-14 20 45 54

To Reproduce

No response

Expected behavior

Regex Match should work the same way Like match does

RustRover-EAP 2024-10-14 20 47 15

Additional context

No response

@blaginin blaginin added the bug Something isn't working label Oct 14, 2024
@blaginin
Copy link
Contributor Author

@goldmedal Do you think we should add tests for something like this in your sqllogictech string files? It feels like operators on everything × everything should catch it. For example, I could find this issue by doing:

image

@Omega359
Copy link
Contributor

#11911

@goldmedal
Copy link
Contributor

@goldmedal Do you think we should add tests for something like this in your sqllogictech string files? It feels like operators on everything × everything should catch it. For example, I could find this issue by doing:

Sure, I think it's good to have a test framework to test a string type with other string types. We only do this kind of thing at

## StringView to Other Types column
########
# test StringViewArray with Utf8 columns
query TTBBBB

If you want to add the test for StirngView specifically, I guess you can do it in this part. Or if you want to do it for all string types, you could create the testing data in https://github.com/apache/datafusion/blob/main/datafusion/sqllogictest/test_files/string/init_data.slt.part
and add the tests in
https://github.com/apache/datafusion/blob/main/datafusion/sqllogictest/test_files/string/string_query.slt.part

@blaginin
Copy link
Contributor Author

blaginin commented Oct 15, 2024

Or if you want to do it for all string types…

Yes, this feels more robust! Let’s wait for the original issue to be solved than and then add tests for all cases

@blaginin
Copy link
Contributor Author

closed as a duplicate of #11911

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

3 participants