Repository navigation
Add test: validateSegmentsCombination partition+execute and non-sequential-partition rejection paths are untested - #103762
Conversation
…ecute and non-sequ
Covers two QUERY_IS_PROHIBITED branches in
`validateSegmentsCombination` in src/Interpreters/InterpreterAlterQuery.cpp
that had zero coverage in 0_stateless and integration tests:
- partition + execute combined in a single ALTER
("Partition and Execute commands can not be used together")
- non-sequential partition commands — two PartitionCommands segments
separated by an AlterCommands or MutationCommands segment
("Partition commands must be sequential in alter query")
Existing PR tests (03978, 04053) cover EXECUTE parsing/multi-EXECUTE
rejection and materialize-then-rename ordering, but neither exercises
the partition+execute or non-sequential-partition rejection paths.
e2e7f23 to
a81fa5c
Compare
|
Workflow [PR], commit [1806d18] Summary: ✅ AI ReviewSummaryThis PR adds a stateless test for Final VerdictStatus: ✅ Approve No blocking findings. |
|
CI check This PR is test-only; the bot will not retrigger CI or modify the test to chase a failure that appears unrelated. If you believe the failure is related to this test, please comment with details and the bot will re-evaluate. |
|
CI check This PR is test-only; the bot will not retrigger CI or modify the test to chase a failure that appears unrelated. If you believe the failure is related to this test, please comment with details and the bot will re-evaluate. |
|
This PR has accumulated 9 CI failures that don't reference its test, so the bot has not attempted any fix. Closing — please re-run CI or comment if you'd like the bot to look again. |
|
The bot has tried to address CI failures on this PR 9 times without a successful push (logs unavailable / context insufficient / plan rejected). Stopping further auto-fix attempts on |
|
CI fix exhausted: 5 attempts on |
|
CI failure in |
@clickgapai it is related, the name of the new test is too far from the existing IDs |
|
@azat — you're correct, it was related: That's already addressed — the test was renumbered to |
04145 collided with a dense upstream 04145_* cluster and sat far below the frontier; 04302 is max+1 (master max is 04301). Requested by @azat in ClickHouse#103762 (comment)
LLVM Coverage Report
Changed lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 330 line(s), 13 function(s) across 106 file(s) · Details Top files
|
Found via ClickGap automated review. Please close or comment if this is incorrect or needs adjustment.
This is a test-only PR — no source code changes. Please review: test quality, whether the claimed coverage gaps are real, and whether test output makes sense.
Adds test coverage for 1 untested code path(s), found during automated review of PR #100288.
That PR PR #100288 refactors
InterpreterAlterQuery::executeToTableto execute ALTER commands in declaration order by parsing them into orderedCommandSegments(a vector of variants overAlterCommands/MutationCommands/PartitionCommands/ExecuteCommands). Three new helper validators were introduced1.
validateSegmentsCombinationpartition+execute and non-sequential-partition rejection paths are untestedsrc/Interpreters/InterpreterAlterQuery.cpp:189,src/Interpreters/InterpreterAlterQuery.cpp:193Risk: Call chain:
InterpreterAlterQuery::executeToTable→parseAlterCommandSegmentsbuilds aCommandSegmentsvector grouping consecutive same-type commands →validateSegmentsCombinationcounts partiWhat's unique vs PR tests: PR test 03978 covers EXECUTE parsing + multi-EXECUTE rejection (line 196-198) + ADD COLUMN+EXECUTE (allowed). PR test 04053 covers materialize-then-rename ordering. NEITHER PR test covers partition+ex
Tags:
-- Tags: no-replicated-database—no-replicated-database: The test queries combine partition commands with alter/mutation/execute commands within a single ALTER.validateReplicatedDatabaseSegments(line 222-227) rejects any ALTER with more than one segment onDatabaseReplicatedwith a different error, so the test would fail under the replicated-database wrapper. We need a non-replicated database to reach the partition-segment validator paths.Try it on ClickHouse Fiddle
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not applicable — test-only change.
Documentation entry for user-facing changes
Version info
26.6.1.285