clickhouse-java icon indicating copy to clipboard operation
clickhouse-java copied to clipboard

[client-v2] Added setting log_comment

Open chernser opened this issue 1 year ago • 1 comments

Summary

There is an option to set a comment that will be seen in system.query_log record associated with a query. It is useful for troubleshooting. In case of HTTP interface client should send the comment thru query parameter log_comment.

Closes: https://github.com/ClickHouse/clickhouse-java/issues/1836

Checklist

Delete items not relevant to your PR:

  • [ ] Unit and integration tests covering the common scenarios were added
  • [ ] A human-readable description of the changes was provided to include in CHANGELOG
  • [ ] For significant changes, documentation in https://github.com/ClickHouse/clickhouse-docs was updated with further explanations or tutorials

chernser avatar Oct 10 '24 14:10 chernser

Thanks @mzitnik! I've replaced code with shared constant from ClientSettings.

chernser avatar Oct 29 '24 16:10 chernser

Thanks @mzitnik! I've replaced code with shared constant from ClientSettings.

Actually was referring if we can have a common base class since there is shared code

mzitnik avatar Oct 29 '24 16:10 mzitnik

Quality Gate Failed Quality Gate failed

Failed conditions
50.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Oct 29 '24 16:10 sonarqubecloud[bot]

@mzitnik I think, we should not do it to keep developer away from idea of extracting common part. I do not plan to add all server settings in such way and it should not be a problem for maintenance. What I'm afraid of that joining two separate mechanisms will lead to more rigid code and it will not save time as intendent.

chernser avatar Oct 29 '24 16:10 chernser