-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 <bowenlan23@gmail.com>
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 <bowenlan23@gmail.com>
❌ 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 <bowenlan23@gmail.com>
We can do efficient DateHistogram aggregation under composite aggregations. --------- Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com> (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 <bowenlan23@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>
…11914) We can do efficient DateHistogram aggregation under composite aggregations. --------- (cherry picked from commit d5a6f99) Signed-off-by: bowenlan-amzn <bowenlan23@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> (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 <bowenlan23@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> (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 <bowenlan23@gmail.com>
…ch-project#11505) We can do efficient DateHistogram aggregation under composite aggregations. --------- Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
…ch-project#11505) We can do efficient DateHistogram aggregation under composite aggregations. --------- Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
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.