-
Notifications
You must be signed in to change notification settings - Fork 141
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
[BUG] LIKE escape special characters with '\' not working #779
Comments
@chloe-zh Thanks for reporting the issue with very detailed info. Will check if this can be fixed soon. |
@jingyali-apr We haven't worked on this yet. Will evaluate the solution first. Thanks! |
What version is AES7.10? The sample query is working in most recent SQL plugin. result from current engine
when legacy engine is forced
node details
explain from current engine
|
Maybe it was fixed by #696 |
What is the bug?
We followed MySQL syntax and tried to escape special character like '%' and '_' with the escape char ‘\', because MySQL uses '\' as the escape character, but seems it does not work.
Our observation only applies to some queries that are pushed down to the DSL.
How can one reproduce the bug?
Example A:
Explain:
Example B:
Explain:
What is the expected behavior?
The default escape is expected to work. It would be better if users are able to use alternative escape character e.g.
What is your host/environment?
Do you have any screenshots?
NA
Do you have any additional context?
NA
Proposal to fix
Add instructions for escape cases to build wildcard query from
LIKE
: https://github.com/opensearch-project/sql/blob/main/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/FilterQueryBuilder.java#L59The text was updated successfully, but these errors were encountered: