Open nik9000 opened 2 months ago
Pinging @elastic/es-analytical-engine (Team:Analytics)
Some of https://github.com/elastic/elasticsearch/issues/110923 need to happen before GA of INLINESTATS. Some need to happen after. Some are entirely unrelated.
Maybe we should also consider an optimization, where the output columns of INLINESTATS are actually unused (e.g. DROPped) - then we don't need to perform INLINESTATS/a 2-phase query at all.
Description
https://github.com/elastic/elasticsearch/pull/109583 will add support for INLINESTATS, a command to run a STATS and then merge the results into the stream of results. This issue tracks follow up work:
Before GA
// TODO once inlinestats supports expressions in groups we'll likely need the same sort of extraction here
)profile
| INLINESTATS a=AVG(foo) | WHERE foo > a
should be able to push thefoo > a
bit in the second phase. It can't now.brokenWhy-Ignore
,byConstant-Ignored
INLINESTATS x=MAX(a), x=MIN(a)
-shadowingInternal-Ignored
shadowingSelfBySelf
INLINESTATS
in CCS. This includes ensure that the two phase execution model interacts properly with the newly CCS execution info metadata that is gathered: https://github.com/elastic/elasticsearch/pull/112595/files#r1763676152Phased
stuff further into physical planning. It'd be nice to, for example, and aSubqueryExec
plan that runs likePhased
does here. Not sure if physical or logical - but physical feels better. We're doing logical now though.BUCKET
function. Sounds like it doesn't work at the moment.with message
Evantually