elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.73k stars 24.68k forks source link

Refactor ESQL optimizer rules #109215

Closed not-napoleon closed 3 weeks ago

not-napoleon commented 4 months ago

Split the OptimizerRules class and associated tests into individual top level classes and single-class test files.

Right now, the OptimizerRules class is over 1000 lines long, and has another 1000+ lines in core, and all it does is wrap many small static classes. Those should all be pulled up to the top level, and have individual test files, so it's clearer what our coverage gaps are.

elasticsearchmachine commented 4 months ago

Pinging @elastic/es-analytical-engine (Team:Analytics)

vishv843 commented 4 months ago

Hey can I work on this?

astefan commented 3 weeks ago

I think this is complete with PR1, PR2, PR3, PR4, PR5 (and maybe others) merged.

Other work that is related, but far more involved than the regular approachable refactoring, is captured in this comment about moving the majority of the remaining test methods in individual files with time and when working on specific areas. This work requires much more targeted knowledge about optimization rules and which tests are related more to a specific rule than others.