You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SimplifyComparisonArithmetics optimization rule isn't being applied everywhere we expect. We see this as test failures for cases that should be optimized by this rule. There are several related issues, this one is about failures related to using the QL Neg and Sub classes, instead of the ES|QL versions, in the mentioned optimization.
Steps to Reproduce
Run the SQL tests (soon to be ported to ES|QL)
Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered:
This pulls the SimplifyComparisonArithmetics optimization into ESQL proper, from core, and in doing so resolves two of the issues we uncovered with that optimization.
Rather than moving this into a sub-class of OptimzierRules, I've opted to create a new package optimizer.rules, and put this as a top level class there. I have another PR open that migrates a bunch of other rules into OptimizerRules, and that's in general an area of the code that's being touched a lot lately. Having top level classes in a package, rather than sub-classes in a single class file, will create fewer conflicts while working on things that are actually unrelated in this type of situation.
Although this is a bugfix, I did not mark it for backporting to 8.14. To my knowledge, no users have reported the associated bugs (we found them through migrating tests), and this fix depends on tests and refactorings that were not backported to 8.14. It would be possible to write an 8.14 version of this, but IMHO it's easier to do as a fresh ticket than as a backport and conflict resolution process. If we think that's important, I'm happy to do so, but at the moment I think fixing it for 8.15 is fine.
Note that this is a re-application of the changes in #108200 after we did other refactoring, which that was closed to enable.
Resolves#108388Resolves#108743
Elasticsearch Version
main
Installed Plugins
No response
Java Version
bundled
OS Version
n/a
Problem Description
The
SimplifyComparisonArithmetics
optimization rule isn't being applied everywhere we expect. We see this as test failures for cases that should be optimized by this rule. There are several related issues, this one is about failures related to using the QLNeg
andSub
classes, instead of the ES|QL versions, in the mentioned optimization.Steps to Reproduce
Run the SQL tests (soon to be ported to ES|QL)
Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered: