Skip to content

fix(clickhouse): validate coverage for every join input - #570

Merged
zzylol merged 5 commits into
mainfrom
feat/unified-clickhouse-temporal
Sep 10, 2026
Merged

zzylol merged 5 commits into
mainfrom
feat/unified-clickhouse-temporal

Conversation

@zzylol

@zzylol zzylol commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Why

A joined ClickHouse query could previously accept complete coverage from one summary leaf as evidence for the complete join. That could serve a result while another input was stale, incomplete, or aligned to a different pane boundary.

What

  • Validate temporal coverage independently for every reachable materialized join input.
  • Use each leaf's own SummaryStore result and binding window.
  • Require complete query bounds, pane alignment, and the leaf-specific pane origin before local composition.
  • Fall back to exact ClickHouse execution when any input fails its own coverage contract.

How

The accelerator walks the installed shared QueryPlan DAG, executes each reachable ReadMaterialization leaf separately, and checks that leaf's returned coverage against its catalog binding. Only after every leaf passes does the existing relational runtime join and project the values.

Before

Coverage from one complete summary input could mask a gap in another join input.

After

Every input must independently prove coverage for the requested interval; a stale or incomplete leaf causes fail-closed exact fallback.

Verification

  • cargo fmt -p control_plane -p data_plane -- --check
  • cargo check -p control_plane -p data_plane
  • cargo test -p data_plane --lib asap_clickhouse_query_engine --no-fail-fast (11/11)
  • MVP backend CI

@zzylol
zzylol force-pushed the feat/unified-clickhouse-temporal branch 2 times, most recently from 0f70e49 to ef94f52 Compare September 10, 2026 14:13
@zzylol
zzylol force-pushed the feat/unified-clickhouse-relational-join branch from 8a176f5 to d87bfbb Compare September 10, 2026 14:13
@zzylol
zzylol force-pushed the feat/unified-clickhouse-temporal branch from ef94f52 to c337678 Compare September 10, 2026 14:16
@zzylol
zzylol force-pushed the feat/unified-clickhouse-relational-join branch from d87bfbb to 74fa720 Compare September 10, 2026 14:16
@zzylol
zzylol force-pushed the feat/unified-clickhouse-temporal branch from c337678 to f763b17 Compare September 10, 2026 14:29
@zzylol
zzylol force-pushed the feat/unified-clickhouse-relational-join branch from 74fa720 to 3b15697 Compare September 10, 2026 14:29
@zzylol
zzylol force-pushed the feat/unified-clickhouse-temporal branch from f763b17 to 56536ca Compare September 10, 2026 14:30
@zzylol
zzylol force-pushed the feat/unified-clickhouse-relational-join branch from 3b15697 to 1582453 Compare September 10, 2026 14:30
@zzylol
zzylol force-pushed the feat/unified-clickhouse-temporal branch from 56536ca to fe61603 Compare September 10, 2026 14:35
@zzylol
zzylol force-pushed the feat/unified-clickhouse-relational-join branch 2 times, most recently from 0642263 to ef763e0 Compare September 10, 2026 14:36
@zzylol
zzylol force-pushed the feat/unified-clickhouse-temporal branch from fe61603 to 0f4f556 Compare September 10, 2026 14:36
@zzylol
zzylol force-pushed the feat/unified-clickhouse-relational-join branch from ef763e0 to bdd39bd Compare September 10, 2026 14:44
@zzylol
zzylol force-pushed the feat/unified-clickhouse-temporal branch 2 times, most recently from 118d2b5 to 70f0a5c Compare September 10, 2026 14:47
@zzylol
zzylol force-pushed the feat/unified-clickhouse-relational-join branch 2 times, most recently from bf1ba25 to 2d62236 Compare September 10, 2026 14:51
@zzylol
zzylol force-pushed the feat/unified-clickhouse-temporal branch 2 times, most recently from 1ec60eb to 212a2b3 Compare September 10, 2026 14:56
@zzylol
zzylol force-pushed the feat/unified-clickhouse-relational-join branch 2 times, most recently from 168195a to 300d7f0 Compare September 10, 2026 15:00
@zzylol
zzylol force-pushed the feat/unified-clickhouse-temporal branch 2 times, most recently from c5f15e4 to ce83878 Compare September 10, 2026 16:17
@zzylol
zzylol force-pushed the feat/unified-clickhouse-relational-join branch 2 times, most recently from c752ab4 to fec0c51 Compare September 10, 2026 17:18
@zzylol
zzylol changed the base branch from feat/unified-clickhouse-relational-join to main September 10, 2026 17:46
@zzylol
zzylol force-pushed the feat/unified-clickhouse-temporal branch from ce83878 to d661dc6 Compare September 10, 2026 17:46
@zzylol zzylol changed the title Validate coverage for every ClickHouse join input fix(clickhouse): validate coverage for every join input Sep 10, 2026
@zzylol
zzylol merged commit 5c8b85e 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