fix(clickhouse): tolerate the current no-digits parse message; skip tables with an unfinished mutation - #18
Open
alexey-milovidov wants to merge 1 commit into
Conversation
…ables with an unfinished mutation Two false-positive classes in the `NightlySQLancer` job on ClickHouse master: 1. `Cannot parse number without any digits` (`CANNOT_PARSE_NUMBER`) is what the integer reader throws for a `+` with no digit after it since ClickHouse/ClickHouse#113910 - e.g. `-1 = '+['`, `'+kui' < 917426774`. The expected-expression list already meant to tolerate this shape but carried an old wording that is no longer in the ClickHouse tree, so it never matched. This hit `CODDTest`, `TLPHaving` and `Cast` on 2026-09-19 and 2026-09-22. 2. An `ALTER ... MODIFY COLUMN` whose conversion cannot succeed on the stored values (`String` -> `UInt64` over `''`) commits the new type to the metadata, and the mutation keeps failing. Every read of the column then converts the old parts on the fly and throws `ATTEMPT_TO_READ_AFTER_EOF`, `CANNOT_PARSE_NUMBER` or `CANNOT_PARSE_TEXT` "while reading from part". `MaterializedCte` picked such a column because it now has an exact integer type (2026-09-04, 2026-09-22 twice). A table with an unfinished mutation in `system.mutations` is now not stable for repeated reads, next to the `FINAL`-engine exclusion, so all the schema-picking oracles skip it, rather than whitelisting parse errors that the `Cast` oracle needs to see. Reports: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=de0be4574c3fbe20c7c28c8633416906392e3dd7&name_0=NightlySQLancer&name_1=SQLancer%20%28arm_release%29 https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=de0be4574c3fbe20c7c28c8633416906392e3dd7&name_0=NightlySQLancer&name_1=SQLancer%20%28arm_asan_ubsan%29 https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=112492e63e0866e7f63a4f777358702cbd2b5844&name_0=NightlySQLancer&name_1=SQLancer%20%28arm_asan_ubsan%29 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
This fixes two kinds of false positive that turned the ClickHouse
NightlySQLancerjob red on master on 2026-09-19 and 2026-09-22.1. An outdated expected-error message. Since ClickHouse/ClickHouse#113910, the integer reader throws
Cannot parse number without any digits(CANNOT_PARSE_NUMBER) for a+with no digit after it, for example-1 = '+['or'+kui' < 917426774.getExpectedExpressionErrorswas already meant to tolerate this case, but it had an older wording that is no longer in the ClickHouse tree, so it never matched. This hitCODDTest,TLPHavingandCast. The PR adds the current wording.2. Tables left unreadable by a failed
MODIFY COLUMN. TakeALTER TABLE t2 MODIFY COLUMN c0 UInt64on aStringcolumn that holds''. The new type is committed to the metadata before the mutation runs, and the mutation keeps failing. After that, every read converts the old parts on the fly and throwsATTEMPT_TO_READ_AFTER_EOF,CANNOT_PARSE_NUMBERorCANNOT_PARSE_TEXT"while reading from part". The server is working as designed here (see ClickHouse/ClickHouse#116182).MaterializedCtepicked such columns because they now report an exact integer type.A table with an unfinished mutation in
system.mutationsnow counts as not stable for repeated reads, alongside the existingFINAL-engine exclusion. That covers every oracle that picks tables throughgetRandomTableNonEmptyTables. I chose this over allowlisting the parse errors because theCastoracle needs to see those errors: its 2026-09-19 finding is a real bug, fixed by ClickHouse/ClickHouse#121064.Checked:
mvn verify -DskipTests=truepasses, formatter included. Against a 26.10 server, the newsystem.mutationsquery flags a table after exactly this failedMODIFY COLUMNand leaves a table whoseMODIFY COLUMNsucceeded unflagged.Reports:
Related: ClickHouse/ClickHouse#113910
🤖 Generated with Claude Code