Skip to content
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

Support sub agg in filter rewrite optimization #17447

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bowenlan-amzn
Copy link
Member

@bowenlan-amzn bowenlan-amzn commented Feb 25, 2025

Description

[Describe what this change achieves]

Related Issues

Resolves #12602

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

@bowenlan-amzn
Copy link
Member Author

{"run-benchmark-test": "id_5"}

@bowenlan-amzn
Copy link
Member Author

{"run-benchmark-test": "id_11"}

Copy link
Contributor

The Jenkins job url is https://build.ci.opensearch.org/job/benchmark-pull-request/2442/ . Final results will be published once the job is completed.

Copy link
Contributor

The Jenkins job url is https://build.ci.opensearch.org/job/benchmark-pull-request/2443/ . Final results will be published once the job is completed.

Copy link
Contributor

❌ Gradle check result for a031b5a: 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?

Copy link
Member

@dbwiddis dbwiddis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial pass.

collectableSubAggregators,
sub
);
if (optimized) throw new CollectionTerminatedException();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why create a separate variable here instead of just calling if (filterRewriteOptimizationContext.tryOptimize(...)) { throw... } ?

Comment on lines +566 to +570
// @Override
// protected boolean tryPrecomputeAggregationForLeaf(LeafReaderContext ctx) throws IOException {
// finishLeaf(); // May need to wrap up previous leaf if it could not be precomputed
// return filterRewriteOptimizationContext.tryOptimize(ctx, this::incrementBucketDocCount, segmentMatchAll(context, ctx));
// }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this will be removed when this is ready for review. :)

Comment on lines +144 to +146
} catch (IOException e) {
throw new RuntimeException(e);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we catching a checked exception and rethrowing an unchecked exception here when the method is documented to throw IOException?

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

Successfully merging this pull request may close these issues.

[Proposal] Support sub aggregation in filter rewrite optimization
2 participants