Skip to content

Distinguish scalar format() from output FORMAT after a SELECT comma - #331

Merged
git-hulk merged 1 commit into
AfterShip:masterfrom
Altinity:fix/format-function
Sep 24, 2026
Merged

git-hulk merged 1 commit into
AfterShip:masterfrom
Altinity:fix/format-function

Conversation

@BorisTyshkevich

Copy link
Copy Markdown
Contributor

Fixes #329. A FORMAT token followed by ( after a SELECT-list comma starts the next scalar expression; a normal FORMAT JSON remains the output clause. Regression tests cover first and later SELECT items, both forms together, and formatting round trips.

@git-hulk
git-hulk self-requested a review September 24, 2026 08:57

@git-hulk git-hulk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, thank you.

@git-hulk
git-hulk merged commit 7039993 into AfterShip:master Sep 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The parser accepts the ClickHouse scalar function format() when it is the first SELECT item:

2 participants