Skip to content

feat: build SQL materializations from Planner selection - #623

Merged
zzylol merged 21 commits into
mainfrom
feat/clickhouse-automatic-publication
Sep 11, 2026
Merged

zzylol merged 21 commits into
mainfrom
feat/clickhouse-automatic-publication

Conversation

@zzylol

@zzylol zzylol commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Construct SQL materializations from the actual selected Planner DAG instead of requiring callers to predeclare a winning family and catalog. The automatic publication endpoint accepts SQL, schemas, accuracy, and a plan envelope; it derives supported materializations, retains semantic bindings, and uses the existing atomic install/activate path.

The real mixed-process regression now plans and constructs its state automatically, backfills the filtered ClickHouse population, and combines summary readout with an exact branch. It records the candidate ranking and selected flag from that same search. Missing numeric cost estimates remain explicitly unavailable.

This also fixes two inherited emitter assumptions: backend windows retain their selected duration rather than the legacy edge 5–60 s clamp, and SQL raw input does not acquire PromQL right-closed range semantics. Family/config conversion no longer serializes through an intermediate JSON string.

Validation: 720 control-plane library tests pass; the control-plane binary checks successfully. The real automatic ClickHouse process regression passes (1.42 s), matching the pre-mutation exact result after the source changes. Candidate/publication evidence is saved by CLICKHOUSE_PLANNING_ARTIFACT.

Initial scope is whole-second fixed windows and scalar column reductions; two retained windows cover the completed/active pair. This is not cost-optimized lifecycle selection or complete o11y workload acceleration. Grouped/complex schemas, literal count updates, and boundary fragments remain follow-ups. No performance claim.

Stacked on #618.

@zzylol
zzylol marked this pull request as ready for review September 11, 2026 00:57
@zzylol
zzylol changed the base branch from feat/clickhouse-auto-materialization to main September 11, 2026 01:10
@zzylol
zzylol merged commit 9c6d27a into main Sep 11, 2026
1 check passed
@zzylol
zzylol deleted the feat/clickhouse-automatic-publication branch September 21, 2026 18:40
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