OpenSearch/x-pack/plugin/sql/qa
Andras Palinkas 7f7e938a25
{S,E}QL: Fix optimization of `NotEquals` in conjunctions (#65331) (#65449)
* 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)
2020-11-24 13:20:32 -05:00
..
jdbc Use no-kpi subdomains for tests downloading artifacts (#64502) 2020-11-07 11:30:52 -08:00
server {S,E}QL: Fix optimization of `NotEquals` in conjunctions (#65331) (#65449) 2020-11-24 13:20:32 -05:00
build.gradle SQL: [Tests] Move JDBC integration tests to new module (#56872) (#57072) 2020-05-22 17:49:36 +02:00