You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem?
In order to interact with nested fields in an aggregation, a nested aggregation must be used.
OpenSearch DSL query:
SELECTmin(nested(pages.load_time, pages)) FROM logs WHERE response =200;
However, above nested aggregation query hasn't supported yet in SQL plugin. Aggregation on nested fields directly will lead to incorrect results. Some related issues: #2739, #2529
What solution would you like?
Support nested aggregation with follow syntaxes:
SQL: agg_func(nested(field | [field, path]))
PPL: | stats agg_func(nested(field | [field, path]))
What alternatives have you considered?
For PPL query, an alternative to calculate aggregation on nested field is searching out all nested field data then aggregate:
Activity
[-][WIP][FEATURE] Support nested aggregation[/-][+][FEATURE] Support nested aggregation[/+]alexey-temnikov commentedon Oct 15, 2025
Additional Bug Report: Aggregation Operations Return Null
Created #4564 to track a specific manifestation of this issue where PPL aggregation operations (
stats,top) returnnullfor nested field values.Key findings from #4564:
fieldscommand works correctly on nested fieldsstats COUNT() by nested.fieldreturns null (incorrect)top nested.fieldreturns null (incorrect)LantaoJin commentedon Nov 10, 2025
Nested aggregation for SQL is not in plan