Commit 8db9d8f
cookieark
fix(clickhouse): register table comments via command instead of inline CTAS
ClickhouseEngineAdapter set COMMENT_CREATION_VIEW to COMMENT_COMMAND_ONLY but
never set COMMENT_CREATION_TABLE, so it silently inherited the EngineAdapter
default of IN_SCHEMA_DEF_CTAS. That default asserts the engine can embed
COMMENT '...' inside a CREATE TABLE ... AS SELECT, which ClickHouse Cloud
rejects with a syntax error (code 62, SYNTAX_ERROR).
Setting COMMENT_CREATION_TABLE to COMMENT_COMMAND_ONLY keeps the comment out
of the CTAS entirely and routes both the table description and the column
descriptions through the post-create ALTER TABLE ... MODIFY COMMENT and
ALTER TABLE ... COMMENT COLUMN paths, which the adapter already implements
and which views already rely on.
Fixes #5969
Signed-off-by: cookieark <aishwary.kantode@gmail.com>1 parent 4c54937 commit 8db9d8f
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
0 commit comments