-
Notifications
You must be signed in to change notification settings - Fork 25.3k
SQL: fix LIKE function equality by considering its pattern as well #40260
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
Conversation
is considered in the equality check. Whenever the functions are resolved this check should be used.
Pinging @elastic/es-search |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Good catch
@elasticmachine run elasticsearch-ci/2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (false == super.equals(obj)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return super.equals(obj) && Objects.equals(((Like) obj).pattern(), pattern());
@elasticmachine run elasticsearch-ci/bwc |
1 similar comment
@elasticmachine run elasticsearch-ci/bwc |
This PR adds an
equals
method toLIKE
function so that its pattern is considered as well and not only the field it's applied on.Fixes #39931.