Repository navigation
Use Delta, T64, and ZSTD(3) for TimeSeries timestamps - #120589
nikitamikhaylov wants to merge 5 commits into
Conversation
Apply the codec to generated timestamps in both sample targets. Recognize historical and current generated codecs when copying table definitions.
|
Workflow [PR], commit [f734927] AI ReviewSummaryThis PR switches the auto-generated Findings❌ Blockers
Final VerdictChanges requested. |
T64 and ZSTD(3) for TimeSeries timestamps
Declare the timestamp type through `SAMPLES INNER COLUMNS` when copying a table, so the test exercises regeneration of the recent timestamp. https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=120589&sha=c273d12d9af62b7c0c37c05c455df59deab7c589&name_0=PR&name_1=Fast%20test #120589
| if (auto * timestamp_decl = add_column_if_missing(TimeSeriesColumnNames::Timestamp, dataTypeToAST(resolved_types.timestamp_type))) | ||
| timestamp_decl->setCodec(makeASTFunction( | ||
| "CODEC", make_intrusive<ASTIdentifier>("DoubleDelta"), makeASTFunction("ZSTD", make_intrusive<ASTLiteral>(UInt64{1})))); | ||
| "CODEC", make_intrusive<ASTIdentifier>("T64"), makeASTFunction("ZSTD", make_intrusive<ASTLiteral>(UInt64{3})))); |
There was a problem hiding this comment.
TimeSeries versions are supposed to freeze the generated target-table schema, but this codec switch is unconditional. TimeSeriesVersion.h:33-35 explicitly says schema changes need either a new version or version-aware generation, yet normalizeInnerColumns will now emit CODEC(T64, ZSTD(3)) even for SETTINGS version = 1..5 (the updated gtest_normalize_time_series_definition.cpp:723-728 expectation already shows version = 1 being rewritten this way).
Can we gate the new codec behind a new TimeSeriesVersion and keep CODEC(DoubleDelta, ZSTD(1)) for the older versions, with the same version check in the generated-column detection for CREATE TABLE AS?
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units8 translation units recompiled, 18 s compile time in total, 8 of them have a recent master baseline. |
T64 and ZSTD(3) for TimeSeries timestampsDelta, T64, and ZSTD(3) for TimeSeries timestamps
PromQL Compliance ReportBaseline: S3 master
Note: score is unchanged vs baseline. |
These changes are now included in the combined timestamp and value codec update.
Related: #120454
Use
CODEC(Delta, T64, ZSTD(3))for generatedtimestampcolumns in the samples and recent samples tables ofTimeSeries. Preserve explicit codecs and recognize historical and current defaults inCREATE TABLE AS.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Use
Delta,T64, andZSTD(3)as the defaulttimestampcodec in the samples and recent samples tables of theTimeSeriesengine.Workflow [PR]
Sync PR [sync-upstream/pr/120589]