Skip to content

[Feature][PPL] Publish partial results for fully pushed aggregations #5799

Open

Description

@penghuo

Parent: #5765

Goal

Return meaningful running results for a non-Composite aggregation that is fully pushed to OpenSearch and is the physical Calcite root.

Scope

  • Register the existing OpenSearch search progress listener on the primary SearchTask.
  • Consume partial and final reduce callbacks for eligible non-Composite pushed aggregations.
  • Map InternalAggregations and TotalHits through the existing aggregation parser and value factory.
  • Store the latest aggregation output with REPLACE semantics.
  • Keep the normal primary execution as the authoritative final-result path.

Acceptance criteria

  • A long-running eligible aggregation can expose a non-empty partial result before completion.
  • count() and aggregation rows use the same conversion logic as completed synchronous responses.
  • Composite aggregation remains on the normal ResultSet pagination path.
  • Final async output exactly matches synchronous Calcite PPL output.
  • Reduce callback failures, cancellation, empty snapshots, and concurrent GET are covered by tests.
  • Production behavior does not hard-code an unsafe batched_reduce_size.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    PPLaggregationasynccalciteenhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions