validate column structure before applying patches#99531
Conversation
|
Workflow [PR], commit [2c2c2d3] Summary: ✅ AI ReviewSummaryThis PR hardens patch application across schema evolution by validating per-column types before applying updates, adds per-source filtering in the combined patch path, and adds regression coverage for raw and mixed-source scenarios. I did not find additional high-confidence correctness/safety/performance issues in the current PR head beyond already-posted inline discussion. Missing context
ClickHouse Rules
Final Verdict
|
5cc4acb to
2ac57aa
Compare
dfcfd2b to
2c2c2d3
Compare
LLVM Coverage Report
PR changed lines: PR changed-lines coverage: 98.41% (186/189, 1 noise lines excluded) |
|
Is it possible to have an end-to-end .sql/.sh test in addition to a unit test? |
|
I have looked into it, Alexey, but to replicate the issue we've had on the cloud, we need SMT and shared catalog in order to arrive at schema evolution outside of ALTER MODIFY (which doesn't have the problem we are fixing here). |
85e1445
|
I think this fix is incorrect; we silently lose the data from LWU that was in progress if we ALTER the column type. This fix looks more correct to me: #100107 |
|
thank you, @evillique ! your fix is definitely more correct. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
validate column structure before applying patches
Details:
applyPatchesToBlockRawmatches patch columns to result columns by name only, without type validation. When schema evolution changes a column type (e.g.,UInt32change toString), the patch column has a different type than the result column that results in crash.