Skip to content

feat: add ClickHouse support to sqlc parse#4267

Merged
kyleconroy merged 4 commits intomainfrom
claude/clickhouse-support
Jan 30, 2026
Merged

feat: add ClickHouse support to sqlc parse#4267
kyleconroy merged 4 commits intomainfrom
claude/clickhouse-support

Conversation

@kyleconroy
Copy link
Copy Markdown
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
khepin added a commit to khepin/sqlc that referenced this pull request Apr 15, 2026
* origin/main: (91 commits)
  build(deps): bump urllib3 from 2.6.2 to 2.6.3 in /docs (sqlc-dev#4259)
  build(deps): bump golang from 1.26.0 to 1.26.1 (sqlc-dev#4328)
  build(deps): bump the production-dependencies group across 1 directory with 4 updates (sqlc-dev#4348)
  Upgrade Go version to 1.26.0 (sqlc-dev#4312)
  Install PostgreSQL from theseus-rs/postgresql-binaries instead of apt (sqlc-dev#4310)
  build(deps): bump golang from 1.25.5 to 1.26.0 (sqlc-dev#4294)
  build(deps): bump the production-dependencies group across 1 directory with 2 updates (sqlc-dev#4296)
  Add sqlc-test-setup command for database test environment setup (sqlc-dev#4304)
  build(deps): bump filippo.io/edwards25519 from 1.1.0 to 1.1.1 (sqlc-dev#4303)
  build(deps): bump the production-dependencies group across 1 directory with 4 updates (sqlc-dev#4284)
  feat: add ClickHouse support to `sqlc parse` (sqlc-dev#4267)
  Add GitHub Topic to the plugins page (sqlc-dev#4258)
  build(deps): bump the production-dependencies group across 1 directory with 2 updates (sqlc-dev#4256)
  build(deps): bump the production-dependencies group across 1 directory with 4 updates (sqlc-dev#4248)
  fix(native): make MySQL connection check immediate on first attempt (sqlc-dev#4254)
  feat: graduate parsecmd experiment (sqlc-dev#4253)
  docs: Add Claude Code remote environment setup instructions (sqlc-dev#4246)
  Add parse subcommand with AST JSON output (sqlc-dev#4240)
  feat(postgresql): add analyzerv2 experiment for database-only analysis (sqlc-dev#4237)
  feat: add native database support for e2e tests without Docker (sqlc-dev#4236)
  ...

# Conflicts:
#	internal/engine/sqlite/convert.go
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.

1 participant