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

Possible like/ilike/not_like kernels= escaping problems #1087

Closed
alamb opened this issue Dec 22, 2021 · 6 comments
Closed

Possible like/ilike/not_like kernels= escaping problems #1087

alamb opened this issue Dec 22, 2021 · 6 comments
Labels
arrow Changes to the arrow crate bug

Comments

@alamb
Copy link
Contributor

alamb commented Dec 22, 2021

Describe the bug
@jwdeitch noted on #1085 (comment) that there may be a problem with regex kernels:

I think there may be an outstanding escaping issue in where right-hand side is '%%%' and you want to match on '(literal%)_(literal%)'.... but this problem may be outside the scope of this fix. :)

To Reproduce
TO BE FILED

@alamb alamb added bug arrow Changes to the arrow crate labels Dec 22, 2021
@jwdeitch
Copy link
Contributor

Thanks for filing Andrew!

Here is a reproducer test case:

    test_utf8!(
        ilike_utf8_scalar_regex,
        vec!["%%%"],
        vec![r#"\%_\%"#],
        ilike_utf8,
        vec![true]
    );

the
... pat.replace("%", ".*") ...
areas might need to consider a leading \ to know to not make the .* replacement

@Dandandan
Copy link
Contributor

Dandandan commented Dec 22, 2021

Thanks for filing Andrew!

Here is a reproducer test case:

    test_utf8!(
        ilike_utf8_scalar_regex,
        vec!["%%%"],
        vec![r#"\%_\%"#],
        ilike_utf8,
        vec![true]
    );

the ... pat.replace("%", ".*") ... areas might need to consider a leading \ to know to not make the .* replacement

I guess that's the same/similar as
#415 ?

Do you think so as well?

@jwdeitch
Copy link
Contributor

ah right on. thanks!! that's the same issue

@jwdeitch
Copy link
Contributor

I'll try to submit a patch for this today

@alamb
Copy link
Contributor Author

alamb commented Dec 22, 2021

@Dandandan sorry about the duplicate -- closing as dupe of #415

@Dandandan
Copy link
Contributor

@Dandandan sorry about the duplicate -- closing as dupe of #415

No worries, thanks for tracking the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate bug
Projects
None yet
Development

No branches or pull requests

3 participants