Repository navigation
Allow vertical merge with TTL - #97332
Merged
Merged
Conversation
murphy-4o
force-pushed
the
murphy_issue_85338
branch
from
February 19, 2026 06:29
0377069 to
d7ff9c2
Compare
Contributor
CurtizJ
reviewed
Feb 25, 2026
CurtizJ
left a comment
Member
There was a problem hiding this comment.
Good in general. I've left a few comments.
This commit introduces the TTLDeleteFilterTransform class, which evaluates TTL delete expressions and produces a filter column for vertical merges. It optimizes the handling of expired rows by integrating TTL logic directly into the merging process. Additionally, a new setting, vertical_merge_optimize_ttl_delete, is added to control this behavior. The changes also include updates to the MergeTask to incorporate the new transform and related tests to validate its functionality. Signed-off-by: murphy-4o <>
Signed-off-by: murphy-4o <[email protected]>
- Remove unused `is_table_ttl` field from TTLDeleteFilterTransform - Track new_ttl_info per delete TTL entry and finalize into data part, matching ITTLAlgorithm::finalize behavior - Extract common TTL conditions into canVerticalTTLDelete() to unify duplicated logic between chooseMergeAlgorithm and isVerticalTTLDelete - Remove force_ttl restriction since the filter transform already handles it correctly via isMinTTLExpired - Add test cases verifying delete_ttl_info_min/max metadata in system.parts after vertical merge (with and without WHERE clause) Signed-off-by: murphy-4o <[email protected]> Made-with: Cursor
murphy-4o
force-pushed
the
murphy_issue_85338
branch
from
February 26, 2026 04:16
cd93bfd to
79acd6d
Compare
Signed-off-by: murphy-4o <[email protected]>
CurtizJ
approved these changes
Mar 3, 2026
Merged
via the queue into
ClickHouse:master
with commit Mar 3, 2026
35099ff
287 of 288 checks passed
Member
Member
|
I guess the PR with fix is already opened #98946. |
This was referenced Sep 21, 2026
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.
Fixes: #85338
Tables with
DELETE TTLrules can now use the more memory-efficient vertical merge algorithm instead of being forced into horizontal merge. This significantly reduces peak memory usage during merges on wide tables with many columns. Controlled by the newvertical_merge_optimize_ttl_deleteMergeTree setting (enabled by default).Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Tables with
DELETE TTLrules can now use the vertical merge algorithm.Documentation entry for user-facing changes
Version info
26.3.1.297