Skip to content

docs: state ASAPPlanner's motivation, assumptions and extension scenarios - #533

Merged
zzylol merged 10 commits into
mainfrom
docs/planner-goal-assumptions-scenarios
Oct 2, 2026
Merged

zzylol merged 10 commits into
mainfrom
docs/planner-goal-assumptions-scenarios

Conversation

@zzylol

@zzylol zzylol commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Why

planner-layering.md (#509) said what ASAPPlanner returns, but not why it exists or which assumptions it relies on. Readers had to infer, for example, whether rewrite rules or summary capabilities are discovered automatically (they are not). The doc also did not show how the design is extended.

What

Documentation only, in docs/design_docs/proposals/planner-layering.md.

Goal → Motivation. Existing query engines and optimizers do not consider ASAP primitives, or the query and data workloads of different use cases: streaming or batch input, and repeated, batch or ad hoc queries. So they miss sharing the benefits of ASAP primitives across domains and use cases. ASAPPlanner therefore models four things for an existing query IR: query workloads, data workloads, deployment inputs, and ASAP replacement strategies.

Goal → Assumptions. An explicit, complete list:

  1. Rewrite rules are given.
  2. Summary-family capabilities are given, not derived or learned.
  3. Frontend semantics are given.
  4. Workload descriptions are inputs.
  5. Cost and accuracy come from models.
  6. "Optimal" is relative to the candidate space.
  7. The deployment executes the plan as given.

Scenarios (new section). Each one lists what is given, what is automatic, what stays unchanged, and the current gaps (linked issues):

  • adding a new query to a workload
  • supporting a new query construct
  • adding a new summary family
  • adding a better cost or accuracy estimation
  • adding a windowed sketch such as PromSketch, modelled as an Exponential Histogram window summary over existing families

Before this PR

The Goal section was one paragraph about inputs and outputs. No motivation, no stated assumptions, no extension walkthrough.

After this PR

For example, a reader adding a new quantile sketch finds which six things they must declare and implement. ASAPPlanner then offers, sizes, shares and selects the sketch automatically. The reader also sees which current limitations apply (#523, #524).

🤖 Generated with Claude Code

@zzylol
zzylol merged commit 29c7266 into main Oct 2, 2026
1 check passed
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