elastic / elasticsearch

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

ESQL: Attach query source to profile #111977

Open nik9000 opened 2 months ago

nik9000 commented 2 months ago

Description

Right now our profile and tasks output tells you the operators being run and their state and stuff. It's lovely, but it takes quite a bit of familiarity with the internal to understand which operator goes to which command. It'd be nice if we could attach query source information to the operators.

This is tricky for a few reasons:

  1. Operators don't have to be for a single command - they could be for multiple. I think.
  2. We don't have the infrastructure for serializin the source sitting around when writing the profile output. We like to send the string once and reuse. That's tougher when the serialization happens.
  3. Operators can't see ESQL code intentionally, so we don't leak big stuff into the running operators. We can leak the query source though. That's safe. We just have to do it.
elasticsearchmachine commented 2 months ago

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