Skip to content

refactor(intake): add ClickHouse DAO layer for spans storage#115

Draft
asutermo wants to merge 8 commits into
mainfrom
clickhouse-dao-layer/asutermorris
Draft

refactor(intake): add ClickHouse DAO layer for spans storage#115
asutermo wants to merge 8 commits into
mainfrom
clickhouse-dao-layer/asutermorris

Conversation

@asutermo
Copy link
Copy Markdown
Contributor

Introduce a parameterized query builder and base DAO so span repositories share consistent, help introduce injection-safe ClickHouse access patterns instead of ad hoc f-string SQL assembly.

Introduce a parameterized query builder and base DAO so span repositories
share consistent, injection-safe ClickHouse access patterns instead of
ad hoc f-string SQL assembly.

Signed-off-by: Andrew Suter-Morris <asutermorris@nvidia.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2026

Suite Lines Covered Line Rate Branch Rate
Unit Tests 18646/24682 75.5% 62.0%
Integration Tests 11967/23459 51.0% 26.2%

asutermo and others added 7 commits May 29, 2026 12:49
Move filter construction into clickhouse/filters.py, hide the mutable
builder behind an opaque WhereClause, and route trace rollup SQL through
paginate_subquery so repositories no longer assemble raw predicates.

Signed-off-by: Andrew Suter-Morris <asutermorris@nvidia.com>
Introduce BuiltQuery and TrustedSql so DAO execution only accepts
rendered queries from trusted builders, closing raw SQL tuple escape
hatches and whitelisting sort keys in fetch_all.

Signed-off-by: Andrew Suter-Morris <asutermorris@nvidia.com>
Signed-off-by: Andrew Suter-Morris <asutermorris@nvidia.com>
…use DAO

Bundle sort whitelists into SortSpec, detect conflicting bound parameters
via merge_parameters, and route trace subquery counts through SelectQuery.

Signed-off-by: Andrew Suter-Morris <asutermorris@nvidia.com>
Integrate experiment ClickHouse rollups (#154) with the DAO layer:
experiment_queries module, fetch_rows on ClickHouseDao, and
ExperimentRollupRepository using trusted BuiltQuery execution.

Signed-off-by: Andrew Suter-Morris <asutermorris@nvidia.com>
Signed-off-by: Andrew Suter-Morris <asutermorris@nvidia.com>
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