Repository navigation
Fix ALTER TABLE MODIFY TTL with DateTime causing data loss on 32-bit overflow - #101793
Conversation
|
Workflow [PR], commit [9c295bb] Summary: ✅
AI ReviewSummaryThis PR fixes the direct Missing context / blind spots
Findings❌ Blockers
Final VerdictNot ready. The direct source-column overflow path is much better covered now, but the current patch still changes semantics for valid type-sensitive TTLs and still leaves pre-upgrade LLVM Coverage Report
|
alexey-milovidov
left a comment
There was a problem hiding this comment.
This is doubtful. A complex logic for a simple change. Maybe we can find a better way?
|
Two follow-ups on the merged fix. First, the fix does not protect parts whose Second, a scoping issue in the new fallback itself. The widened-first analysis in |
|
@BoloniniD @alexey-milovidov — ClickGap found the following in this PR:
Close anything that's wrong or already addressed. |
Backport #101793 to 26.8: Fix ALTER TABLE MODIFY TTL with DateTime causing data loss on 32-bit overflow
Cherry pick #101793 to 26.3: Fix ALTER TABLE MODIFY TTL with DateTime causing data loss on 32-bit overflow
Cherry pick #101793 to 26.6: Fix ALTER TABLE MODIFY TTL with DateTime causing data loss on 32-bit overflow
Cherry pick #101793 to 26.7: Fix ALTER TABLE MODIFY TTL with DateTime causing data loss on 32-bit overflow
…using data loss on 32-bit overflow
…using data loss on 32-bit overflow
…using data loss on 32-bit overflow
…ateTime causing data loss on 32-bit overflow
Backport #101793 to 26.7: Fix ALTER TABLE MODIFY TTL with DateTime causing data loss on 32-bit overflow
Backport #101793 to 26.6: Fix ALTER TABLE MODIFY TTL with DateTime causing data loss on 32-bit overflow
Backport #101793 to 26.3: Fix ALTER TABLE MODIFY TTL with DateTime causing data loss on 32-bit overflow
Resolve the conflict in `src/Processors/TTL/ITTLAlgorithm.cpp` by taking the 26.3 side: it already reads TTL inputs with `getColumnOrSubcolumnByName` (adapted in the backport of #101793), and additionally casts them to the types the expression expects. The code fix of #105578 is therefore already present on 26.3; this backport only adds the test `04266_ttl_with_subcolumn_expression`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closes: #101763
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixes silent data loss for TTL expressions that apply large intervals directly to
Date/DateTimesource columns by widening the arithmetic away from 16/32-bit overflow.Documentation entry for user-facing changes
Workflow [PR]
Sync PR [sync-upstream/pr/101793]
Version info
26.9.1.657(included in26.9and later)26.8.3.61,26.7.7.79,26.6.6.8,26.3.33.77