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

Introduce execution hint for Cardinality aggregation #17301

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

asimmahmood1
Copy link

Description

Introduce execution hint for Cardinality aggregation - Revive PR #15764

Related Issues

Resolves #15269

Check List

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

Testing

Tested using big5 dataset, see #16837 (comment)

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.

@github-actions github-actions bot added enhancement Enhancement or improvement to existing feature or request good first issue Good for newcomers Search:Aggregations labels Feb 7, 2025
@@ -125,6 +131,7 @@ protected void innerWriteTo(StreamOutput out) throws IOException {
if (hasPrecisionThreshold) {
out.writeLong(precisionThreshold);
}
out.writeOptionalString(executionHint);
Copy link
Member

Choose a reason for hiding this comment

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

When making ser/de changes there can be issues in mixed clusters (fe during B/G) if this object is serialized to an older node that doesn't understand the value. In such cases, the serialization logic can check the target version (example) to see if the target node is of an older version and exclude it from serialization.

Similarly when deserializing if the request is coming from an older node then if you try to read the value from the StreamInput it will fail.

Copy link
Author

Choose a reason for hiding this comment

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

Ah, good point, will update.

* This PR is reviving opensearch-project#15764

Signed-off-by: Asim Mahmood <[email protected]>
@@ -480,7 +486,7 @@ public void close() {
*
* @opensearch.internal
*/
private static class DirectCollector extends Collector {
public static class DirectCollector extends Collector {
Copy link
Member

Choose a reason for hiding this comment

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

Can these be package-protected?

Copy link
Contributor

github-actions bot commented Feb 7, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request good first issue Good for newcomers Search:Aggregations
Projects
None yet
3 participants