Skip to content

refactor: share installed QueryPlan contracts across components - #634

Merged
zzylol merged 7 commits into
mainfrom
refactor/shared-query-plan-contract
Sep 11, 2026
Merged

zzylol merged 7 commits into
mainfrom
refactor/shared-query-plan-contract

Conversation

@zzylol

@zzylol zzylol commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Installed QueryPlan definitions lived beside control-plane compilation, so data-plane serving imported its runtime contract from the compiler component. This separates ownership without adding a wrapper or a second wire representation.

asap_types::query_plan now owns QueryPlan, materialization bindings, residual operator types, topology checks and activation validation. Planner traversal, binding and AST lowering remain in the control plane as compile_bound* and logical::compile_logical functions. Data-plane engines import the shared types directly; the control plane reexports them for existing type paths. An unused whole-native-root promotion helper is removed.

Before this PR: shared installed data and compiler methods were defined on the same control-plane types.

After this PR: components exchange one shared contract while the control plane remains responsible for constructing it. Serialization, node identities, Catalog references and execution semantics are unchanged. The SDS architecture document records this ownership split.

Verification: 81 shared-type tests, all 763 control-plane tests and 1,095 data-plane unit tests passed; three existing unrelated doctests remain ignored. A Send/Sync assertion protects installed plans from acquiring Planner process-local Rc state. Independent ownership review passed. These suites preceded the latest clean replay of #617/main; CI for that replay is running. No performance claim; collector/transmission contract migration remains separate.

Stacked on #617. Callers of former QueryPlanEntry::compile_* methods now use the control-plane free functions; all in-repository callers are migrated.

@zzylol
zzylol changed the base branch from feat/univmon-runtime to main September 11, 2026 13:10
…-plan-contract

# Conflicts:
#	control_plane/src/query_plan.rs
#	crates/asap_types/Cargo.toml
#	data_plane/tests/clickhouse_differential_e2e.rs
@zzylol
zzylol marked this pull request as ready for review September 11, 2026 14:56
@zzylol
zzylol merged commit d0e3ea3 into main Sep 11, 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