Conversation
50a3972 to
9ceeba7
Compare
ad95c6d to
12ccae2
Compare
12ccae2 to
0afd38a
Compare
2b6171a to
9463710
Compare
36e7da7 to
da6ecbf
Compare
d782c4e to
0349523
Compare
7c45150 to
d0cbd11
Compare
|
High-level questions @zzylol:
|
Both.
There are two levels:
Both have automated coverage: operator tests and DAG integration tests. These were run locally. No separate manual deployment-level verification has been performed. The physical DAG (https://github.com/ProjectASAP/ASAPPlanner/blob/2216fb9/crates/asap-physical-operators/src/plan/mod.rs) comes from the Planner’s post-ASAP plan, followed by binding to concrete operators: SQL / PromQL There are two distinct DAGs:
So deployments reuse Planner-generated plans plus the shared binding/execution infrastructure. They do not need to construct physical DAGs manually, although low-level tests can. This also adds a third testing requirement: verify that Planner-generated DAGs bind correctly, beyond testing individual operators and manually assembled DAGs.
Before: There was no shared physical-operator library for deployments to reuse. After: Deployments can reuse the same physical-operator implementations and physical DAG execution infrastructure. This also provides a common place to implement future physical execution optimizations, such as parallelism and sharding. Those optimizations are not implemented in this PR.
asap-fusion and asapquery will be the deployment, which refer/import the physical operator lib here, and implement their own runtimes, e.g., the precompute engine with a DAG / subDAG, query engine. Putting the phsycial opereator lib together with ASAPPlanner is as Yancheng said the benefits of If we consider organizing the physical operator library inside the ASAPPlanner repo, it has two benefits: when a new IR node is added, we just need one PR for changing both the logical DAG and the physical operator implementation. |
|
|
|
||
| ## Decision and ownership | ||
|
|
||
| ASAP implements and maintains its own physical operators, summary kernels and |
There was a problem hiding this comment.
what is a summary kernel
There was a problem hiding this comment.
summary_kernels/ sketchlib adapters, exact accumulators, factory and traits
Problem
Precompute and query deployments need to execute Planner-selected computations with consistent semantics. Previously, physical computation lived in ASAPQuery-backend and depended on backend types; there was no independent physical-operator library and DAG runtime for deployments to share. Planner IR and deployment implementations could evolve separately.
Before this PR
Deployments could not import a shared Planner-owned implementation to bind and execute a selected physical DAG. Supporting a new IR operation required coordinating Planner semantics with backend-specific execution code.
After this PR
This PR provides both a physical-operator library and a DAG execution runtime in
asap-physical-operators:The plan-to-execution path is:
ExecutableDagdescribes the selected operations, schemas and dependencies.PhysicalDagbinds that description to concrete operator implementations. Deployments provide raw-source connectors or stored-state frontiers and select the DAG/subDAG roots to execute.For example, both deployment phases can use the same rate → weighted summary → candidate readout → grouped Sort/Limit computation. The intended result is unchanged; the change is a common, independently testable implementation and execution path. Keeping IR and physical execution in ASAPPlanner lets a new operation be developed in one PR and tested across the planning/execution boundary, including private implementation APIs.
Weighted CMS/CountSketch matrices, hashing, estimation, candidate heaps and snapshots are owned by
asap_sketchlib;summary_kernels/weighted_frequency.rsnow only adapts Planner parameters, typed values and runtime traits. This PR pins sketchlib commit5f03ccbd798ed5fec62bdd839bcb331123cab369, supplied by asap_sketchlib #160 (pending merge). The existingASAP-WFREQ-1snapshots remain compatible. The dependency upgrade also preserves DDSketch negative/zero stores in full-state and delta adapters.Deployment responsibilities
asap-fusionandASAPQueryremain responsible for their precompute/query engine orchestration: source access, scheduling runs, evaluation windows and revisions, persistent state, publication and serving. They import the shared operators and DAG runtime to execute the selected DAG/subDAG. Deployment-specific runtimes wrap this execution infrastructure.This PR establishes the reusable library path; adopting it in deployed engines and verifying real storage-to-serving workflows remain backend integration work.
E2E behavior and current evidence
The raw Scan → Sort → Limit tests use a manually constructed executable DAG. The Planner TopK test supplies already-computed rate values. Full SQL/PromQL text → raw in-memory input → Planner → native execution coverage still needs to be added. SQL-to-post-ASAP tests establish planning coverage, not full native execution.
Automated tests were run locally. No separate manual deployment-level verification has been performed.
Scope
ASAP implements and maintains the operators and runtime, using DataFusion's organization and execution contracts as a reference. Parallelism, sharding, spill and richer physical optimization are future capabilities that can be implemented in this shared library. They are not provided by this PR, and no performance improvement or complete SQL semantic equivalence is claimed.
Architecture and operator coverage · DataFusion comparison