-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[ bug ]请简要描述Clickhouse集群DDL语句 命令报错 #1426
Comments
麻烦提供下clickhouse实例的版本号,我本地使用v22.1.3.7测试没有报语法错误,可能是explain ast的兼容性问题 |
然后改写下sql重新检测下看是否还报错: |
explain ast从v21.1.2.15起才支持非select语句,后面我改下兼容问题,低版本先跳过检查 |
好的,幸苦!如果跳过低版本跳过检查,语句执行报错时(包含语法错误),能不能考虑前台打印出来错误信息啊~ |
执行报错默认会展示到前台“审核/执行信息”字段 |
好的 |
在提交 issue 前,请查阅以下资源,请先进行搜索来保证没有类似的 issue。
文档 | FAQ
重现步骤
1、Clickhouse集群SQL上线中:
执行语句:ALTER TABLE t1 on cluster bigdata ADD COLUMN
create_time
DateTime64(3) DEFAULT now64(3) COMMENT '创建时间';/(ALTER TABLE t1 ADD COLUMNcreate_time
DateTime64(3) DEFAULT now64(3) COMMENT '创建时间';)2、报错:
审核信息列:explain语法检查错误:Code: 62.
DB::Exception: Syntax error: failed at position 19 ('TABLE'): TABLE t1 on cluster bigdata ADD COLUMN
create_time
DateTime64(3) DEFAULT now64(3) COMMENT '创建时间'. Expected one of: Equals, Dot, token.3、手工去数据库中执行命令,命令成功。
期待结果和实际结果
期待结果:语句执行成功。
实际结果:SQL检查不通过,系统自动驳回。
截图
错误日志
[2022-03-28 15:49:43,051][MainThread:139859518359360][task_id:default][clickhouse.py:123][WARNING]- ClickHouse语句执行报错,语句:explain ast ALTER TABLE t1 on cluster bigdata ADD COLUMN
create_time
DateTime64(3) DEFAULT now64(3) COMMENT '创建时间',错误信息Code: 62.DB::Exception: Syntax error: failed at position 19 ('TABLE'): TABLE t1 on cluster bigdata ADD COLUMN
create_time
DateTime64(3) DEFAULT now64(3) COMMENT '创建时间'. Expected one of: Equals, Dot, token. Stack trace:版本信息
应用版本/分支:
Archery (v1.8.3)
部署方式:Docker、手工部署
手工部署
The text was updated successfully, but these errors were encountered: