Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CHSettingMinVersions = map[CHSetting]chproto.Version{ SettingJsonTypeEscapeDotsInKeys: {Major: 25, Minor: 8, Patch: 0}, SettingTypeJsonSkipDuplicatedPaths: {Major: 24, Minor: 8, Patch: 0}, SettingMaxTableSizeToDrop: {Major: 23, Minor: 12, Patch: 0}, }
CHSettingMinVersions maps setting names to their minimum required ClickHouse versions that PeerDB supports. If minimum version is not specified, we assume the setting is available to all ClickHouse versions
Functions ¶
Types ¶
type CHSetting ¶
type CHSetting string
const ( SettingAllowNullableKey CHSetting = "allow_nullable_key" SettingJsonTypeEscapeDotsInKeys CHSetting = "json_type_escape_dots_in_keys" SettingTypeJsonSkipDuplicatedPaths CHSetting = "type_json_skip_duplicated_paths" SettingThrowOnMaxPartitionsPerInsertBlock CHSetting = "throw_on_max_partitions_per_insert_block" SettingParallelDistributedInsertSelect CHSetting = "parallel_distributed_insert_select" SettingMaxTableSizeToDrop CHSetting = "max_table_size_to_drop" )
When adding a new clickhouse setting to this list, check when the setting is introduced to ClickHouse and if applicable, add a corresponding minimum supported version below to ensure queries on older versions of ClickHouse servers are not impacted. Important: if the setting causes breaking changes to existing PeerDB flows (not just ClickHouse compatibility), it must also be gated by PeerDB's internal version.
type CHSettingEntry ¶
type CHSettingEntry struct {
// contains filtered or unexported fields
}
type CHSettings ¶
type CHSettings struct {
// contains filtered or unexported fields
}
func NewCHSettings ¶
func NewCHSettings(version *chproto.Version, settings ...CHSettingEntry) *CHSettings
func (*CHSettings) Add ¶
func (sg *CHSettings) Add(key CHSetting, val string) *CHSettings
func (*CHSettings) String ¶
func (sg *CHSettings) String() string
String generates settings string ' SETTINGS <key1> = <val1>, <key2> = <val2>, ...'; If ClickHouse version is set in the CHSettings, settings that do not meet CH version requirement will be filtered out. Otherwise, all settings are included.