pypika
pypika copied to clipboard
Add support of SETTINGS ClickHouse clause
Summary
Clickhouse SQL has an optional SETTINGS
clause with SELECT
s which can be used to configure all kinds of options.
This PR adds a settings
method to ClickHouseQueryBuilder
to add these options to a SELECT
query.
All current (Clickhouse 24.4) settings keys are snake-case. Therefore I opted to use the settings keys directly as kwargs to the settings
method, allowing passing multiple settings pairs in one call in a Pythonic/ideomatic way.
Test Plan
Added a unit test to exercise the new function.