-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…5449) * Fix the `CombineBinaryComparisons` optimizer rule, so that semantic equality taken into account during the optimization of `NotEquals` Examples that previously removed the `NotEquals` expressions (leading to incorrect results): ``` double >= 10 AND integer != 9 --> double >= 10 keyword != '2021' AND datetime >= '2020-01-01T00:00:00' --> datetime >= '2020-01-01T00:00:00' ``` With the fix, expressions like the above will not be touched. `NotEquals` will only be eliminated from the `AND` expression if the left side of the `NotEquals` `semanticEquals()` to the left side of the other expressions within the conjunction (comparisons against the same field/expression). * Unit tests and integration tests Close #65322 (cherry-picked from 8b2b7fa)
- Loading branch information
Andras Palinkas
committed
Nov 24, 2020
1 parent
be2ed11
commit 7f7e938
Showing
3 changed files
with
66 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters