Skip to content

Conversation

@LantaoJin
Copy link
Member

Description

Support nested aggregation. With this PR, follow SQL are able to exectue a nested aggregation query.

SELECT min(nested(pages.load_time, pages)) FROM logs WHERE response = 200;

And it equals the DSL

GET logs/_search
{
  "query": {
    "match": { "response": "200" }
  },
  "aggs": {
    "pages": {
      "nested": {
        "path": "pages"
      },
      "aggs": {
        "min_load_time": { "min": { "field": "pages.load_time" } }
      }
    }
  }
}

Issues Resolved

PR resolves #2813 and #2529, and partly resolves #2739 since nested function hasn't supported in PPL yet.

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Lantao Jin <ltjin@amazon.com>
@opensearch-trigger-bot
Copy link
Contributor

This PR is stalled because it has been open for 30 days with no activity.

@RyanL1997
Copy link
Collaborator

@LantaoJin Same as the other stalled PR, do we still need this change?

@LantaoJin
Copy link
Member Author

@LantaoJin Same as the other stalled PR, do we still need this change?

I am going to file another PR to fix it for PPL first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Support nested aggregation [BUG] fields is changing the outcome of the following commands that depend on selected fields

2 participants