feat(clickhouse): execute typed exact leaves in shared DAG - #589
Merged
Merged
Conversation
zzylol
force-pushed
the
feat/unified-clickhouse-exact-leaves
branch
from
September 10, 2026 18:57
fa73c1b to
73b440a
Compare
This was referenced Sep 10, 2026
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.
Why
A planner-selected SQL plan can contain one summary-backed branch and one exact ClickHouse branch. The shared query DAG already represented that boundary as
ExternalExact, but the ClickHouse runtime could not fetch its typed relation or compose it with summary readouts.What
ExternalExactnode.JSONCompactrelations, including timezone-qualified timestamps.QueryPlanDAG.How
The control plane publishes SQL, output schema, parameters, and evaluation-range parameter names on
ExternalExactRequest. The data plane forwards each ClickHouse leaf to the configured exact backend, validates response metadata against the planned schema, and supplies the typed relation to the ordinary relational executor. Summary coverage validation remains per materialization leaf.Before this PR
A mixed plan reached
ExactFallback; only all-summary relational DAGs could execute locally.After this PR
One installed DAG can read SummaryStore state, execute a typed exact SQL leaf in ClickHouse, join both relations, and apply the remaining projection. No ClickHouse-specific catalog, sidecar plan, or alternate executor is introduced.
Verification
cargo fmt --all -- --checkcargo check -p control_plane -p data_plane --lib -j 1cargo test -p data_plane asap_clickhouse_query_engine::accelerator::tests --lib -j 1— 4 passed0.5result and evaluation-range parameters.Limitations
The control plane must still choose and bind the explicit exact cut. A live ClickHouse differential run and the full 27-query workload report remain follow-up validation.