v.25.8Improvement

Fix parsing of a trailing comma

Fix parsing of a trailing comma in columns of the CREATE DICTIONARY query after a column with parameters, for example, Decimal(8). Closes #85586. #85653 (Nikolay Degterinsky).
Fixes a parsing issue in CREATE DICTIONARY queries where a trailing comma after a column with parameters (e.g., Decimal(8)) caused errors.

Why it matters

This fix resolves the problem where CREATE DICTIONARY statements failed to parse correctly if a trailing comma appeared after columns defined with parameters. It improves the robustness and usability of dictionary creation by allowing proper syntax with trailing commas.

How to use it

Users can write CREATE DICTIONARY queries with columns that have parameters and safely include a trailing comma after such columns without encountering syntax errors. For example:

CREATE DICTIONARY dict_name (
key UInt64,
value Decimal(8),
) PRIMARY KEY key ...