FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Tags · AfterShip/clickhouse-sql-parser · GitHub

Tags: AfterShip/clickhouse-sql-parser

Tags

v0.5.6

Toggle v0.5.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix parsing of a parenthesized left operand of a set operator (#312)

v0.5.5

Toggle v0.5.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Allow CAST as a table function argument (#307)

Table function arguments are parsed by parseTableArgPrimaryExpr, which
had no case for CAST. It read the keyword as an ordinary function name,
so CAST's own AS separator ended the argument list and
numbers(CAST(1 + 1 AS UInt64)) failed with "expected ')'". Route CAST to
parseColumnCastExpr, as parseColumnExpr already does. CAST is not
reserved, so it also matches TokenKindIdent and the new case has to come
before that one.

Only the argument list of a table function reaches this parser, never
the table name, so a table called cast still parses. Both CAST spellings
are covered, since parseColumnCastExpr reads AS and ',' alike.

Checked against clickhouse-local 26.7.1, which accepts the new
statements and their formatted output.

Assistant By Claude Opus 5

v0.5.4

Toggle v0.5.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Update version from 0.4.17 to 0.5.4

v0.5.3

Toggle v0.5.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix signed number after ')' or ']' being lexed as a literal (#286) (#287

)

`Lexer.hasPrecedenceToken` decides whether a `+`/`-` is a sign or a binary
operator by looking at the previous token, but its set omitted the closing
brackets. `(1)-1` and `arr[1]-1` therefore lexed `-1` as a signed literal,
leaving two adjacent expressions with no operator, so valid ClickHouse SQL
was rejected.

Add `TokenKindRParen` and `TokenKindRBracket` to the set, since a closing
bracket ends an expression just like an identifier or a number does.

v0.5.2

Toggle v0.5.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix traversal of semantic AST children (#285)

v0.5.1

Toggle v0.5.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add COMMENT support to CREATE VIEW parser (#265)

CREATE VIEW in ClickHouse supports COMMENT between the schema and AS SELECT:

  CREATE VIEW db.v (columns) COMMENT '{...}' AS SELECT ...

The parser previously failed with 'expected EOF or ; but got COMMENT'.

Changes:
- Add Comment field to CreateView struct (ast.go)
- Parse COMMENT clause in parseCreateView before AS (parser_view.go)
- Format COMMENT in CreateView.FormatSQL (format.go)
- Add test case: create_view_with_comment.sql
- Update golden files for existing view tests (new nil Comment field)

v0.5.0

Toggle v0.5.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Support expressions (dotted column refs) in `DISTINCT ON` (#258)

parseDistinctOn() was calling parseIdent() which only handles simple
identifiers. Queries like DISTINCT ON (t.id, t.name) would fail because
the dot was not recognized. Changed to parseExpr() so that any valid
column expression (including table.column references) is accepted.

v0.4.19

Toggle v0.4.19's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix parsing failure when having multiple ttl expressions (#234)

v0.4.18

Toggle v0.4.18's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add support of parsing Tuple type in DDL (#225)

v0.4.17

Toggle v0.4.17's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
bug: fix a crash with an invalid query following MODIFY QUERY (#215)

ALTER TABLE foo MODIFY QUERY <an invalid query> crashed the parser with a sigsegv due to a missing error check; this commit adds the missing check and a regression test.

Back | FazBrowse Home | New Git URL