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

Lile/ILike predicate issue with strings containing '\n' #14751

Closed
Inspector97 opened this issue Mar 25, 2019 · 0 comments

Comments

Projects
None yet
3 participants
@Inspector97
Copy link

commented Mar 25, 2019

Hazelcast version 3.11.1, cluster of 2 nodes. No clients.
Having a entities strored with field declared as String text; I build chained Predicate as
predicate = Predicates.and(predicate, Predicates.like("text", ...); and other predicates, e.g. eq, in and so on.
like (and ilike as well) doesn't catch any entity with text field containing '\n' character, even if pattern passed is '%'. All other strings are filtered perfectly (thank you for this option, it is great).

@ahmetmircik ahmetmircik self-assigned this Mar 25, 2019

@mmedenjak mmedenjak added this to the 3.12 milestone Mar 25, 2019

ahmetmircik added a commit that referenced this issue Mar 26, 2019

Enable DOTALL flag to match line termination characters for LIKE pred… (
#14760)

…icate

closes #14751 

`like` predicate doesn't match with line terminators as `\n`. This PR enables `java.util.regex.Pattern.DOTALL` flag to fix this for LIKE and ILIKE. So `%` will match `any character`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.