Open costin opened 1 year ago
The optimizer knows to combine projections or aggregates and projections but only when they are right next to each other. If there's another node in between (sort, limit, filter) it doesn't:
| stats c = count() | filter c > 10 | limit 10 | keep c
The keep is redundant.
keep
Pinging @elastic/es-ql (Team:QL)
Pinging @elastic/elasticsearch-esql (:Query Languages/ES|QL)
Pinging @elastic/es-analytics-geo (Team:Analytics)
Description
The optimizer knows to combine projections or aggregates and projections but only when they are right next to each other. If there's another node in between (sort, limit, filter) it doesn't:
The
keep
is redundant.