Skip to content

Prototype incremental Calcite producers for PPL partial results - #3

Draft
penghuo wants to merge 1 commit into
feat/ppl-partial-resultsfrom
feat/ppl-partial-results-incremental-operator-poc
Draft

penghuo wants to merge 1 commit into
feat/ppl-partial-resultsfrom
feat/ppl-partial-results-incremental-operator-poc

Conversation

@penghuo

@penghuo penghuo commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Purpose

Personal-review PoC for incremental partial-result producers on top of the existing PPL async-query branch.

This PR is intentionally a Draft and is not ready to merge.

What is included

  • Async-only Calcite planning context; synchronous planning remains unchanged.
  • Incremental Aggregate, Eventstats/running Window, Dedup, TopK, and Calc operators.
  • Changelog propagation across supported operator compositions without whole-plan replay.
  • Completed-page snapshots for fully pushed composite aggregations.
  • Root-operator listener bridge for publishing REPLACE snapshots.
  • Semantic validation report and reproducible five-query validation script.

Semantic validation

Query shape Result
Non-blocking REX stable prefix PASS
Fully pushed aggregation partial reduce PASS
Composite aggregation completed pages PASS
Incremental Eventstats meaningful partial result FAIL: no coverage/progress; async is ~4.38x sync
Unsupported finite Window progress-only FAIL: final-only with unknown progress

See docs/dev/ppl-partial-results-semantic-validation.md.

Verification

  • Focused core/OpenSearch/plugin unit tests: PASS
  • Existing Calcite aggregation/eventstats/dedup/top/rare/streamstats IT: PASS
  • ./gradlew :integ-test:yamlRestTest -DignorePrometheus: PASS
  • ./gradlew doctest -DignorePrometheus: 86/86 PASS
  • Spotless checks: PASS

Known correctness and resource gaps

  • Checkpoint buffering can retain a large fraction of source rows.
  • Aggregate delete-and-recreate within one batch needs identity cleanup.
  • Floating-point aggregate retractions are not guaranteed to match full recomputation.
  • Runtime contexts need exception-safe cleanup around late plan rewriting.
  • Composite snapshots need to honor the final query-size limit.
  • Incremental TopK currently retains all live input rows for mutable input.
  • Progressive planner/REST composition coverage is still missing from CI.

These gaps are left visible for design/code review; no fallback was added to hide them.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant