Skip to content

Commit

Permalink
修复clickhouse上线审核版本兼容性问题
Browse files Browse the repository at this point in the history
  • Loading branch information
nick2wang committed Mar 28, 2022
1 parent 8763fe2 commit 2f8377d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sql/engines/clickhouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ def explain_check(self, check_result, db_name=None, line=0, statement=''):
sql=statement,
affected_rows=0,
execute_time=0, )
# clickhouse版本>=20.6.3才使用explain检查
if self.server_version >= (20, 6, 3):
# clickhouse版本>=21.1.2 explain ast才支持非select语句检查
if self.server_version >= (21, 1, 2):
explain_result = self.query(db_name=db_name, sql=f"explain ast {statement}")
if explain_result.error:
check_result.is_critical = True
Expand Down

0 comments on commit 2f8377d

Please sign in to comment.