Repository navigation
TimeSeries: Rename inner column metric_family_name to metric_family - #119226
Conversation
|
Workflow [PR], commit [a78d687] Summary: ✅
AI ReviewSummaryThis PR bumps Missing context / blind spots
Findings
Final VerdictRequest changes. The rename itself is mostly wired through, but the compatibility story is still incomplete around LLVM Coverage ReportMeasured on commit a78d687.
Changed lines: Changed C/C++ lines covered: 240/245 (97.96%) · Uncovered code |
metric_family_name to metric_familymetric_family_name to metric_family
19f46dd to
3cd65c4
Compare
| case ViewTarget::Metrics: | ||
| { | ||
| add_column_if_missing(TimeSeriesColumnNames::MetricFamilyName, makeASTDataType("String")); | ||
| add_column_if_missing(TimeSeriesColumnNames::getInnerMetricFamily(time_series_settings[TimeSeriesSetting::version]), makeASTDataType("String")); |
There was a problem hiding this comment.
This only adds the version-4 spelling. If a user writes the legacy spelling directly in a new definition, for example
CREATE TABLE ts ENGINE = TimeSeries
METRICS INNER COLUMNS (metric_family_name LowCardinality(String))
METRICS ENGINE = ReplacingMergeTree ORDER BY metric_family_namenormalizeInnerColumns leaves metric_family_name as an extra column, adds a fresh metric_family String here, and the read/write paths still use only metric_family. So the requested customization silently lands on a dead column, and the sort key can stay attached to that dead column too. The external-table path throws a targeted exception for the same mismatch; this direct INNER COLUMNS / INNER ENGINE path should either rename the legacy spelling or reject it as well.
There was a problem hiding this comment.
This is only fixed for the INNER COLUMNS half. The legacy spelling is rejected only when it appears in the explicit inner column list (normalizeTimeSeriesDefinitionImpl.cpp:1104). If a new definition omits METRIC FAMILIES INNER COLUMNS and only says METRIC FAMILIES ENGINE = ReplacingMergeTree ORDER BY metric_family_name, normalizeInnerEngine keeps that explicit ORDER BY unchanged and only synthesizes a key when it is missing (normalizeTimeSeriesDefinitionImpl.cpp:1612). So the direct INNER ENGINE path still carries the stale identifier instead of renaming or rejecting it.
3cd65c4 to
7ea894e
Compare
metric_family_name to metric_familymetric_family_name to metric_family
| CREATE TABLE ts_metrics ( | ||
| metric_family_name String, | ||
| metric_family String, | ||
| type String, | ||
| unit String, | ||
| help String) | ||
| ENGINE = ReplacingMergeTree ORDER BY metric_family_name; | ||
| ENGINE = ReplacingMergeTree ORDER BY metric_family; |
There was a problem hiding this comment.
The column of the inner table was named metric_family_name before, and now it's named metric_family.
Build profile diff (arm_release)Commit See the job log for details. |
cc5c4a1 to
dc04d0f
Compare
dc04d0f to
a78d687
Compare
PromQL Compliance ReportBaseline: S3 master
Note: score is unchanged vs baseline. |
The precision test only writes external samples and tags. Let `TimeSeries` generate its unused metric-families target instead of defining an external table with the pre-version-6 `metric_family_name` column. This keeps the fixture compatible with both the PR base and current master without changing the evaluation-time assertions. Related: ClickHouse#120942 (comment) Related: ClickHouse#119226 CI: https://github.com/ClickHouse/ClickHouse/actions/runs/35799204924
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
There is an outer column of
TimeSeriestable engine calledmetric_family, but the matching column of the inner tables was calledmetric_family_name. This PR renames the inner column to match the outer column:metric_family_name->metric_family.Workflow [PR]
Sync PR [sync-upstream/pr/119226]
Version info
26.10.1.452-master(included in26.10and later)