Skip to content

refactor(sds): share typed value projections with precompute plans - #625

Merged
zzylol merged 5 commits into
mainfrom
refactor/typed-table-value-projection
Sep 11, 2026
Merged

zzylol merged 5 commits into
mainfrom
refactor/typed-table-value-projection

Conversation

@zzylol

@zzylol zzylol commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

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 share ValueProjectionIdentity and adds finite numeric constants using the Planner's existing ScalarValue.

Before this PR, precompute configuration carried value_column and its state schema carried a separate ColumnRef; 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.

@zzylol
zzylol marked this pull request as ready for review September 11, 2026 01:21
@zzylol
zzylol changed the base branch from feat/clickhouse-automatic-publication to main September 11, 2026 01:27
@zzylol
zzylol merged commit 9e03a44 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