Skip to content

ESQL QL Grand Refactor #106679

@nik9000

Description

@nik9000

Description

When we built ESQL we built it on top of QL's core, which itself was refactored fairly quickly out of SQL. It's what we had time for and it had a lot of goodies. But it brought a lot of baggage. SQL and EQL live on top of _search and ESQL doesn't, for example.

  • Make a copy of the ql project and make esql depend only on this.
  • Find all of the tests in SQL, EQL, and QL that we implicitly rely on from ESQL and port them to ESQL (at least optimizer rules tests + expression translator tests)
  • refactor/trim the Expression tree
  • Unify data types management (ie. avoid mix ofDataTypes and EsqlDataTypes)
  • Unify type resolution management (ie. avoid mix of TypeResolutions and EsqlTypeResolutions)
  • Replace EvalMapper with calls to EvaluatorMapper#toEvaluator
  • refactor/trim the ExpressionTranslators
  • Move everything from EvaluatorMapper to ESQL's Expression superclass
  • Double-check exception management (ie. make sure that all the exceptions thrown are EsqlClientException, and not only QlClientException)
  • Double-check the usage of QL optimization rules (see QL OptimizerRules vs ESQL OptimizerRules)
  • Have our own LogicalPlans and PhysicalPlans
  • ESQL: Merge Verifier based function validation into the functions #116336

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions