-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Apply the fast filter optimization to composite aggregation #11505
Apply the fast filter optimization to composite aggregation #11505
Conversation
Compatibility status:Checks if related components are compatible with change ce81e3d Incompatible componentsIncompatible components: [https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/cross-cluster-replication.git] Skipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/alerting.git] |
❌ Gradle check result for 36f98e7: 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 06a007e: FAILURE 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? |
PR Analysis
PR Feedback
|
06a007e
to
d8f337b
Compare
❌ Gradle check result for d8f337b: FAILURE 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 e7d8af9: 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 589d03c: FAILURE 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? |
589d03c
to
3a621c4
Compare
❌ Gradle check result for 3a621c4: FAILURE 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? |
Signed-off-by: bowenlan-amzn <[email protected]>
3a621c4
to
c6874c1
Compare
❌ Gradle check result for c6874c1: FAILURE 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 f2a220f: FAILURE 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? |
server/src/main/java/org/opensearch/search/aggregations/bucket/FastFilterRewriteHelper.java
Outdated
Show resolved
Hide resolved
Signed-off-by: bowenlan-amzn <[email protected]>
❌ Gradle check result for ce81e3d: FAILURE 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? |
Confirmed it's flaky test #9605 |
❕ Gradle check result for ce81e3d: 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. |
…ch-project#11505) We can do efficient DateHistogram aggregation under composite aggregations. --------- Signed-off-by: bowenlan-amzn <[email protected]>
We can do efficient DateHistogram aggregation under composite aggregations. --------- Signed-off-by: bowenlan-amzn <[email protected]> (cherry picked from commit d5a6f99) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…11914) We can do efficient DateHistogram aggregation under composite aggregations. --------- (cherry picked from commit d5a6f99) Signed-off-by: bowenlan-amzn <[email protected]> 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>
…11914) We can do efficient DateHistogram aggregation under composite aggregations. --------- (cherry picked from commit d5a6f99) Signed-off-by: bowenlan-amzn <[email protected]> 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> (cherry picked from commit 6ed7565) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…11914) We can do efficient DateHistogram aggregation under composite aggregations. --------- (cherry picked from commit d5a6f99) Signed-off-by: bowenlan-amzn <[email protected]> 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> (cherry picked from commit 6ed7565) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…ch-project#11505) We can do efficient DateHistogram aggregation under composite aggregations. --------- Signed-off-by: bowenlan-amzn <[email protected]>
…ch-project#11505) We can do efficient DateHistogram aggregation under composite aggregations. --------- Signed-off-by: bowenlan-amzn <[email protected]>
…ch-project#11505) We can do efficient DateHistogram aggregation under composite aggregations. --------- Signed-off-by: bowenlan-amzn <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
Description
This PR adds the fast filter optimization to composite aggregation (comp-agg).
The optimization only applies when date histogram is the only source of comp-agg and no parent or sub aggregations.
The optimization only applies when the query is a range query on the same date field or is a MatchAllDocsQuery
The optimization acts on segment level, the rewritted range filters take in leaf context and give the counts of each range.
Refactor
collect
togetLeafCollector
. Because if this try succeed, we don't need to return a collector to collect later. The results (doc counts of buckets) are saved at Aggregator or Shard level and will be processed by buildAggregations method later.Glossary
Related Issues
Resolves #11301
Check List
New functionality includes testing.Public documentation issue/PR createdBy 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.