Merge pull request #39120 from ClickHouse/kssenii-patch-5

Update cluster.py
This commit is contained in:
Kseniia Sumarokova 2022-07-12 18:35:00 +02:00 committed by GitHub
commit 5235396c24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2943,7 +2943,12 @@ class ClickHouseInstance:
ignore_error=False,
query_id=None,
):
logging.debug("Executing query %s on %s", sql, self.name)
sql_for_log = ''
if len(sql) > 1000:
sql_for_log = sql[:1000]
else:
sql_for_log = sql
logging.debug("Executing query %s on %s", sql_for_log, self.name)
return self.client.query(
sql,
stdin=stdin,