Skip to content

feat: bind SQL populations and projections through SummaryCatalog - #614

Merged
zzylol merged 13 commits into
mainfrom
feat/clickhouse-table-population
Sep 11, 2026
Merged

zzylol merged 13 commits into
mainfrom
feat/clickhouse-table-population

Conversation

@zzylol

@zzylol zzylol commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

SQL summaries must read the population and timestamp projection recorded in their catalog. Add typed table predicates and an explicit timestamp column to shared metadata and identity; bind ClickHouse backfill to the installed value/time columns and parameterized predicates.

Before, SQL binding rejected metric predicates, an unfiltered table could acquire an implicit metric filter, and backfill could read deployment-default columns that differed from the query. After, filtered and unfiltered tables preserve their catalog population, the compiler checks the source time column, and integer-millisecond timestamp bounds retain their exact inclusivity. Legacy PromQL filters are rejected on table sources.

Validation: the initial implementation passed 719 control-plane, 79 shared-type, and 103 backfill tests. The timestamp/population fixes passed both SQL compiler tests and real ClickHouse regressions: an unfiltered two-metric backfill uses the installed timestamp despite a wrong deployment default; a filtered mixed process query excludes distractor rows and the endpoint, matches ClickHouse, and reads unchanged summary state after source mutation. Independent source review found no remaining blocker. CI validates the refreshed dependency stack.

Existing SQL materializations must be republished and rebuilt because table/value/time/population identity changes. Legacy PromQL identity remains unchanged. Backfill still buffers a window. Automatic construction, complex SQL schemas, arbitrary boundary fragments, and full o11y workload acceleration remain follow-up work; this PR makes no performance claim.

Depends on #613 shared precompute contracts; #612 typed source is merged. Includes the additive shared partitioning contract from #609.

@zzylol
zzylol marked this pull request as ready for review September 11, 2026 00:27
…-population

# Conflicts:
#	data_plane/src/query_engines/asap_clickhouse_query_engine/accelerator.rs
#	data_plane/src/storage_engines/sketch_db/backfill/clickhouse_reader.rs
#	data_plane/src/storage_engines/sketch_db/backfill/service.rs
@zzylol
zzylol changed the base branch from refactor/shared-precompute-plan-contract to main September 11, 2026 00:44
@zzylol
zzylol merged commit 31047bb 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