Skip to content

Conversation

@kyleconroy
Copy link
Collaborator

Add ClickHouse support using the github.com/sqlc-dev/doubleclick parser library.

New files in internal/engine/clickhouse/:

  • parse.go: Parser implementation using doubleclick
  • convert.go: AST converter from doubleclick to sqlc AST
  • format.go: ClickHouse-specific SQL formatting
  • catalog.go: Catalog initialization
  • stdlib.go: Standard library functions
  • reserved.go: Reserved keywords
  • utils.go: Helper functions
  • parse_test.go: Unit tests

Supported SQL operations:

  • SELECT with JOINs, subqueries, CTEs, window functions
  • INSERT with VALUES and SELECT subquery
  • UPDATE and DELETE
  • CREATE TABLE, ALTER TABLE, DROP TABLE, TRUNCATE

kyleconroy and others added 4 commits January 16, 2026 20:39
Add ClickHouse support using the github.com/sqlc-dev/doubleclick parser library.

New files in internal/engine/clickhouse/:
- parse.go: Parser implementation using doubleclick
- convert.go: AST converter from doubleclick to sqlc AST
- format.go: ClickHouse-specific SQL formatting
- catalog.go: Catalog initialization
- stdlib.go: Standard library functions
- reserved.go: Reserved keywords
- utils.go: Helper functions
- parse_test.go: Unit tests

Supported SQL operations:
- SELECT with JOINs, subqueries, CTEs, window functions
- INSERT with VALUES and SELECT subquery
- UPDATE and DELETE
- CREATE TABLE, ALTER TABLE, DROP TABLE, TRUNCATE

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Remove ClickHouse from compiler/engine.go and config.go.
Add --dialect clickhouse support to the sqlc parse command.

Co-Authored-By: Claude <noreply@anthropic.com>
@kyleconroy kyleconroy changed the title feat: add ClickHouse database engine support feat: add ClickHouse support to sqlc parse Jan 17, 2026
@kyleconroy kyleconroy marked this pull request as ready for review January 30, 2026 05:38
@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jan 30, 2026
@kyleconroy kyleconroy merged commit 16c9afd into main Jan 30, 2026
13 checks passed
@kyleconroy kyleconroy deleted the claude/clickhouse-support branch January 30, 2026 05:39
@dosubot dosubot bot added the 🔧 golang label Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files. 🔧 golang

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants