feat: bind SQL populations and projections through SummaryCatalog - #614
Merged
Merged
Conversation
…contract' into feat/clickhouse-table-population
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
changed the base branch from
refactor/shared-precompute-plan-contract
to
main
September 11, 2026 00:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.