Skip to content

Type physical plan references as summary definitions - #572

Merged
zzylol merged 2 commits into
mainfrom
refactor/typed-summary-definition-refs
Sep 10, 2026
Merged

zzylol merged 2 commits into
mainfrom
refactor/typed-summary-definition-refs

Conversation

@zzylol

@zzylol zzylol commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Why

Physical plan contracts used PolicyFingerprint directly as a materialization reference while QueryPlan and SummaryCatalog used SummaryDefinitionId. The identical wire value hid two different concepts and made it easy to pass policy-registry identity where an SDS definition reference was required.

Before this PR

Collector, precompute schema, producer, transmission, lifecycle, runtime-evidence, and summary-frame contracts exposed PolicyFingerprint. Validation repeatedly converted those values back into catalog definition IDs. Receiver lineage also discarded the typed SDS identity.

After this PR

Every physical plan projection and summary frame carries SummaryDefinitionId. PolicyFingerprint remains an internal content hash used to derive and look up legacy precompute configurations, with conversions limited to those compatibility boundaries. Frame lineage preserves the typed definition identity end to end. Concrete stored state continues to use SummaryInstanceId; no SID alias or raw u64 instance identity is introduced.

The serde representation remains transparent, so this is wire-compatible while giving Rust callers a compile-time boundary between policy hashes, summary definitions, and summary instances.

Verification

  • cargo check --workspace --all-targets
  • cargo test -p control_plane --lib physical::compiler::tests (67 passed)
  • cargo test -p data_plane --lib frame_lineage (7 passed)
  • git diff --check

Depends on #567.

ClickHouse migration surface: populate SummaryDefinitionId for physical references and resolve it through the shared SummaryCatalog. External exact nodes remain independent of summary definition and instance identities.

@zzylol
zzylol force-pushed the refactor/publish-authoritative-catalog branch from fcfb778 to 2d05cfb Compare September 10, 2026 15:00
@zzylol
zzylol changed the base branch from refactor/publish-authoritative-catalog to main September 10, 2026 15:57
@zzylol
zzylol force-pushed the refactor/typed-summary-definition-refs branch from 9c69b67 to 316660a Compare September 10, 2026 15:57
@zzylol
zzylol merged commit c44520b into main Sep 10, 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