Repository navigation
Add test: Fallback path in checkDataPart and MergeTreeDataPartWide::doCheckConsistency (parts without columns_substreams.txt) is untested for wide parts with Dynamic columns - #103907
Conversation
|
Workflow [PR], commit [0ab8f82] Summary: ❌
AI ReviewSummaryThis PR adds a new stateless shell test for the Findings
Tests
ClickHouse Rules
Final VerdictStatus: Minimum required action: make the new test fail if |
| # Detach so the part is unloaded from memory; then physically remove columns_substreams.txt | ||
| # (the file is not listed in checksums.txt — it's a metadata-only file). | ||
| $CLICKHOUSE_CLIENT -q "DETACH TABLE test_check_dynamic_old;" | ||
| rm -f "$path/columns_substreams.txt" |
There was a problem hiding this comment.
rm -f makes this test able to pass even when columns_substreams.txt was never present (wrong part selected, path mismatch, or format behavior change), so the fallback branch might not actually be exercised.
Please assert the file exists before deleting it, and then delete without -f (or fail explicitly if deletion does not happen). That keeps the test validating the intended regression scenario instead of silently becoming a no-op.
|
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 5 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. |
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 #103858.
That PR PR #103858 fixes false-positive
NO_FILE_IN_DATA_PARTerrors during data-part check (CHECK TABLE) and consistency check (called on part load / ATTACH / BACKUP) forMergeTreetables with JSON columns in wide parts. (1) The PR rewritescheckDataPart(Wide branch) and `MergeTreeDataPartWide::doC1. Fallback path in
checkDataPartandMergeTreeDataPartWide::doCheckConsistency(parts withoutcolumns_substreams.txt) is untested for wide parts withDynamiccolumnssrc/Storages/MergeTree/checkDataPart.cpp:290,src/Storages/MergeTree/MergeTreeDataPartWide.cpp:393Risk: Call chain:
ATTACH TABLE→loadDataParts→IMergeTreeDataPart::loadColumnsChecksumsAndIndexes→loadColumnsSubstreams(file missing →columns_substreamsstays empty) →checkConsistency→**What's unique vs PR tests:** PR's04109_check_table_json_wide.sqlonly exercises the PRIMARY branch (cols_substreams not empty) with a JSON column — newly-written parts always havecolumns_substreams.txt`, so the FALLBACK branChangelog 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