Repository navigation
Fix alter with custom disk - #109199
Fix alter with custom disk#109199
Conversation
|
Workflow [PR], commit [7c77c06] Summary: ✅
AI ReviewSummaryThis PR fixes the Missing context / blind spots
Findings❌ Blockers
Final Verdict❌ Request changes. The original |
| auto merge_tree_settings = result.index ? result.index->getDefaultSettings() : std::make_shared<MergeTreeSettings>(); | ||
| if (projection_definition->with_settings) | ||
| merge_tree_settings->applyChanges(projection_definition->with_settings->changes); | ||
| merge_tree_settings->applyChanges(projection_definition->with_settings->changes, query_context, isLoadingFromExistingMetadata(mode)); |
There was a problem hiding this comment.
applyChanges now resolves disk before the projection allowlist check below. A query like PROJECTION p (...) WITH SETTINGS disk = disk(type = local, path = '...') will create/register the custom disk first and only then throw Setting disk is not allowed for projections, leaving global disk state behind from an invalid DDL.
The projection allowlist needs to run before applyChanges here, or disk needs to be rejected without ever calling resolveDiskSetting.
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 83/89 (93.26%) · Uncovered code |
Antalya 26.6 Backport of ClickHouse#109199 - Fix alter with custom disk
…ustom-disk Fix alter with custom disk
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
This patch fixes ALTERS for MergeTree tables for which the
disksetting was specified.Fixes: #63019
Version info
26.7.1.523(included in26.7and later)