Repository navigation
Forbid empty part name in detached part operations - #98299
Merged
Merged
Conversation
`ALTER TABLE ... DROP DETACHED PART ''` and `ALTER TABLE ... ATTACH PART ''` with an empty part name triggered a `LOGICAL_ERROR` exception in `PartsTemporaryRename::tryRenameAll`. Added an empty name check to `validateDetachedPartName` so it throws a proper `BAD_DATA_PART_NAME` error. https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=0c6b9571104017f6a5811dba92571887b1a62e15&name_0=MasterCI&name_1=BuzzHouse%20%28amd_debug%29 Co-Authored-By: Claude Opus 4.6 <[email protected]>
Contributor
|
Workflow [PR], commit [09fdc20] Summary: ❌
|
alexey-milovidov
added a commit
that referenced
this pull request
Mar 1, 2026
Forbid empty part name in detached part operations
Contributor
|
Hi @alexey-milovidov — the changelog category for this PR might need a look. Current: Why: The code adds validation to reject empty part names in detached part operations (DROP DETACHED PART and ATTACH PART), which is a user-visible fix preventing invalid operations that could cause issues. Could you verify this is correct? Ignore if the current category is intentional. |
1 task
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.
Closes #98052
Summary
validateDetachedPartNameso thatALTER TABLE ... DROP DETACHED PART ''andALTER TABLE ... ATTACH PART ''throw a properBAD_DATA_PART_NAMEerror instead of aLOGICAL_ERRORexceptionCI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=0c6b9571104017f6a5811dba92571887b1a62e15&name_0=MasterCI&name_1=BuzzHouse%20%28amd_debug%29
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Forbid empty part name in
ALTER TABLE ... DROP DETACHED PARTandALTER TABLE ... ATTACH PARTto avoid aLOGICAL_ERRORexception.Documentation entry for user-facing changes
🤖 Generated with Claude Code
Version info
26.3.1.152