-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand streaming Aggregations to Cardinality Aggregator #19484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand streaming Aggregations to Cardinality Aggregator #19484
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #19484 +/- ##
============================================
- Coverage 73.09% 72.96% -0.13%
+ Complexity 70553 70508 -45
============================================
Files 5716 5717 +1
Lines 322926 322995 +69
Branches 46770 46780 +10
============================================
- Hits 236032 235676 -356
- Misses 67882 68368 +486
+ Partials 19012 18951 -61 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
❕ Gradle check result for c1979ea: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
|
❌ Gradle check result for bfe824e: null Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
❕ Gradle check result for 4b6dd24: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
|
@harshavamsi we should add integ test similar to the ones we have for streaming terms aggregation. We should do it for both numeric and cardinality aggs. |
|
❕ Gradle check result for 94ce824: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>
1913943 to
53a7264
Compare
|
❌ Gradle check result for 53a7264: null Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
...-rpc/src/internalClusterTest/java/org/opensearch/streaming/aggregation/SubAggregationIT.java
Show resolved
Hide resolved
...-rpc/src/internalClusterTest/java/org/opensearch/streaming/aggregation/SubAggregationIT.java
Show resolved
Hide resolved
...r/src/main/java/org/opensearch/search/aggregations/metrics/CardinalityAggregatorFactory.java
Show resolved
Hide resolved
...r/src/main/java/org/opensearch/search/aggregations/metrics/CardinalityAggregatorFactory.java
Show resolved
Hide resolved
|
In order to allow cardinality aggregator, we also need to enable it at RestSearchAction level - OpenSearch/server/src/main/java/org/opensearch/rest/action/search/RestSearchAction.java Line 463 in 86ada27
|
I just checked, it seems like we don't need to explicitly check here. So looks good. |
* Add streaming cardinality aggregator Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com> * Add reset Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com> * Add reset Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com> * Add more tests Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com> * add more tests Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com> * add integ tests Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com> --------- Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com> (cherry picked from commit 9923617) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
|
created a follow up #19518 to handle other underlying issues |
) * Add streaming cardinality aggregator * Add reset * Add reset * Add more tests * add more tests * add integ tests --------- (cherry picked from commit 9923617) Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
|
|
||
| public void testBasicCardinality() throws Exception { | ||
| try (Directory directory = newDirectory()) { | ||
| try (IndexWriter indexWriter = new IndexWriter(directory, new IndexWriterConfig())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caveat! These tests should be improved with RandomIndexWriter to verify the work on segmented index.
…roject#19484) * Add streaming cardinality aggregator Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com> * Add reset Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com> * Add reset Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com> * Add more tests Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com> * add more tests Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com> * add integ tests Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com> --------- Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>
Description
Expands streaming aggregations to cardinality aggregator. This PR ensures that we only use the Ordinals Collector while streaming and resets the value after each new batch.
Related Issues
Resolves #19515
Check List
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.