Skip to content

CI Fix - Clickhouse-Cloud CI Currently Failing #5969

Description

@cmgoffena13

Link: https://github.com/SQLMesh/sqlmesh/actions/runs/32525879293/job/96916106556

This is broken code in sqlmesh/core/engine_adapter/clickhouse.py

AI Notes

Failing Tests
tests/core/engine_adapter/integration/test_integration.py::test_ctas
tests/core/engine_adapter/integration/test_integration.py::test_ctas_source_columns

What’s Wrong
When SQLMesh creates a ClickHouse table from a SELECT (CREATE TABLE ... AS SELECT) and the table has a description, we stick COMMENT '...' into that statement. ClickHouse does not allow that there — it expects AS SELECT next, so the create fails with a syntax error.

Possible Fix

Don’t put the comment in the CTAS SQL.
Create the table first, then set the comment with ALTER TABLE ... MODIFY COMMENT (that path already exists).

Easiest lever: set COMMENT_CREATION_TABLE = CommentCreationTable.

COMMENT_COMMAND_ONLY (same idea as views already use).

Metadata

Metadata

Assignees

Labels

BugSomething isn't workingEngine: ClickhouseIssues related to Clickhouse

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions