Open
Description
Let's get rid of this big TODO here :)
Especially important to enable multiple INLINESTATS in the same command (c.f. test case here and comment on why this may be broken here).ESQL: INLINESTATS implementation with multiple LogicalPlan updates #128917- INLINESTATS after SORT, see initial bug report here. This currently is nicely handled with an error message
Unbounded sort not supported yet [SORT gb DESC] please add a limit
INLINESTATS after STATSTests added here- Let's also re-enable this optimizer test and other tests disabled in ESQL: Refactor Join inside the planner #115813, like this logical plan optimizer test: https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizerTests.java
- This query used to fail:
FROM kibana_sample_data_logs | EVAL timestamp=DATE_TRUNC(5 minute, @timestamp) | INLINESTATS results = count(*) by timestamp | keep results, timestamp
Let's add a test and potentially fix it. - Fix
FROM idx | EVAL ip = to_ip(host), x = to_string(host), y = to_string(host) | INLINESTATS max(id)
and re-enable the corresponding telemetry test case muted here.