refactor(sds): share typed value projections with precompute plans - #625
Merged
Merged
Conversation
zzylol
marked this pull request as ready for review
September 11, 2026 01:21
zzylol
changed the base branch from
feat/clickhouse-automatic-publication
to
main
September 11, 2026 01:27
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 summary inputs such as
count(*)require a literal projection, while the catalog and precompute schemas currently describe values with different column-only types. This change makes them shareValueProjectionIdentityand adds finite numeric constants using the Planner's existingScalarValue.Before this PR, precompute configuration carried
value_columnand its state schema carried a separateColumnRef; neither could represent a literal input. After this PR, catalog descriptors, precompute configuration and state validation use the same sample/column/constant projection. Legacy column fields deserialize into that type and preserve existing column policy identities. ClickHouse backfill sends constants as typed parameters, retains installed population/time binding, and rejects integer constants outside its exact Float64 ingest range.Validation: all 81 shared-type tests, 720 control-plane tests and 6 ClickHouse reader tests passed. Tests cover legacy column identity, JSON/YAML constant roundtrips, legacy state-schema decoding, invalid constants, conflicting projection aliases and parameterized reader SQL. Performance measurements are not applicable to this contract change. Automatic
count(*)lowering and a real constant-input process differential test follow separately; this PR does not claim new workload acceleration.