Repository navigation
Reject data type names that start with a digit - #109720
Merged
Merged
Conversation
The AST fuzzer produced a column type like `Nullable(multiply(Decimal(76, 12), `8`))` that triggered an `Inconsistent AST formatting` logical error (STID 1941-26fa). `ParserDataType` accepts a quoted identifier as a type name, so `8` parses into an `ASTDataType` named `8`. The formatter prints type names unquoted (see the existing comment in `ParserDataType`), so it becomes a bare `8`, which re-parses as a numeric literal instead of a type name. This breaks the format/parse round-trip consistency check in `executeQueryImpl` (debug/sanitizer builds). Extend the parse-time guard that already rejects other non-round-trippable quoted type names (`Array(`x.y`)`, `` `Null` ``) to also reject a name whose first character is a digit, since such a name is only reachable via quoting and can never round-trip through unquoted formatting. CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=02d808ad2d907c2f4a513b19e0850a6c1c68bf29&name_0=MasterCI&name_1=Stateless%20tests%20%28amd_debug%2C%20distributed%20plan%2C%20s3%20storage%2C%20parallel%29 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Contributor
|
Workflow [PR], commit [14f2cf0] Summary: ✅
AI ReviewSummaryThis PR fixes the fuzzer-reported AST round-trip failure for purely numeric quoted type names such as Findings
Final VerdictChanges requested: narrow the new rejection to the non-round-trippable numeric-literal shapes rather than all digit-prefixed names. |
Contributor
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 5/5 (100.00%) · Uncovered code |
This was referenced Jul 9, 2026
alexey-milovidov
added a commit
that referenced
this pull request
Jul 11, 2026
Pulls in the `ParserDataType` fix from #109720, which resolves the `AST fuzzer (amd_debug, targeted)` failure seen on this PR (`Inconsistent AST formatting`, STID 1941-1bfa, issue #109501). Co-Authored-By: Claude Fable 5 <[email protected]>
1 task
zeekay
pushed a commit
to hanzoai/datastore
that referenced
this pull request
Sep 11, 2026
…ata-type-name Reject data type names that start with a digit
zeekay
pushed a commit
to hanzoai/datastore
that referenced
this pull request
Sep 11, 2026
Pulls in the `ParserDataType` fix from ClickHouse#109720, which resolves the `AST fuzzer (amd_debug, targeted)` failure seen on this PR (`Inconsistent AST formatting`, STID 1941-1bfa, issue ClickHouse#109501). Co-Authored-By: Claude Fable 5 <[email protected]>
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: #108372
Related: #109158
The AST fuzzer produced a column type like
Nullable(multiply(Decimal(76, 12), `8`))that triggered anInconsistent AST formattinglogical error (STID 1941-26fa) on master.ParserDataTypeaccepts a quoted identifier as a type name, so`8`parses into anASTDataTypenamed8. The formatter prints type names unquoted (there is already a comment about this inParserDataType), so the node becomes a bare8, which re-parses as a numeric literal instead of a type name. This breaks the format/parse round-trip consistency check inexecuteQueryImplthat runs in debug/sanitizer builds.The fix extends the parse-time guard that already rejects other non-round-trippable quoted type names (
Array(`x.y`),`Null`) to also reject a name whose first character is a digit: such a name is only reachable via quoting and can never survive unquoted formatting.CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=02d808ad2d907c2f4a513b19e0850a6c1c68bf29&name_0=MasterCI&name_1=Stateless%20tests%20%28amd_debug%2C%20distributed%20plan%2C%20s3%20storage%2C%20parallel%29
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Reject data type names that start with a digit (e.g.
`8`), which could not survive AST formatting round-trip and produced anInconsistent AST formattinglogical error under the fuzzer.Documentation entry for user-facing changes
🤖 Generated with Claude Code
Version info
26.7.1.692(included in26.7and later)