| 101 | } |
| 102 | |
| 103 | function getClickhouseSettings(): ClickHouseSettings { |
| 104 | const additionalSettings = |
| 105 | getSafeJson<ClickHouseSettings>(process.env.CLICKHOUSE_SETTINGS || '{}') || |
| 106 | {}; |
| 107 | |
| 108 | return { |
| 109 | distributed_product_mode: 'allow', |
| 110 | date_time_input_format: 'best_effort', |
| 111 | ...(process.env.CLICKHOUSE_SETTINGS_REMOVE_CONVERT_ANY_JOIN |
| 112 | ? {} |
| 113 | : { |
| 114 | query_plan_convert_any_join_to_semi_or_anti_join: 0, |
| 115 | }), |
| 116 | ...additionalSettings, |
| 117 | }; |
| 118 | } |
| 119 | |
| 120 | // Request gzip is on by default — pays CPU on the worker to send less data |
| 121 | // over the wire. For payload-heavy buffers (replay) the gzip step happens on |