> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 其他格式设置

> “其他”自动生成分组中的 ClickHouse 格式设置。

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>类型</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>默认值</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          无需重启即可更改
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

这些设置是根据[源文件](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/FormatFactorySettings.h)自动生成的。

<div id="allow_special_bool_values_inside_variant">
  ## allow\_special\_bool\_values\_inside\_variant
</div>

<SettingsInfoBlock type="Bool" default_value="0" />

允许将 "on"、"off"、"enable"、"disable" 等特殊文本 Bool 值解析为 Variant 类型中的 Bool 值。

<div id="check_conversion_from_numbers_to_enum">
  ## check\_conversion\_from\_numbers\_to\_enum
</div>

<SettingsInfoBlock type="Bool" default_value="1" />

如果值在 Enum 中不存在，则在从 Numbers 转换为 Enum 时抛出异常。

可能的值：

* 0 — 已禁用。
* 1 — 已启用。

**示例**

```text theme={null}
CREATE TABLE tab (
  val Enum('first' = 1, 'second' = 2, 'third' = 3)
) ENGINE = Memory;

INSERT INTO tab SETTINGS check_conversion_from_numbers_to_enum = 1 VALUES (4); -- returns an error
```

<div id="column_names_for_schema_inference">
  ## column\_names\_for\_schema\_inference
</div>

用于 schema inference 的列名列表，适用于不包含列名的格式。格式为：'column1,column2,column3,...'

<div id="errors_output_format">
  ## errors\_output\_format
</div>

<SettingsInfoBlock type="String" default_value="CSV" />

将错误写入文本输出的方式。

<div id="insert_distributed_one_random_shard">
  ## insert\_distributed\_one\_random\_shard
</div>

<SettingsInfoBlock type="Bool" default_value="0" />

在没有分布式键时，启用或禁用向 [Distributed](/docs/zh/reference/engines/table-engines/special/distributed) 表随机选择一个分片进行插入。

默认情况下，当向包含多个分片的 `Distributed` 表中插入数据时，如果没有分布式键，ClickHouse server 会拒绝任何插入请求。当 `insert_distributed_one_random_shard = 1` 时，则允许插入，数据会被随机转发到所有分片中的某一个。

可能的值：

* 0 — 如果存在多个分片且未提供分布式键，则拒绝插入。
* 1 — 如果未提供分布式键，则在所有可用分片中随机选择一个分片进行插入。

<div id="interval_output_format">
  ## interval\_output\_format
</div>

<SettingsInfoBlock type="IntervalOutputFormat" default_value="numeric" />

允许为时间间隔类型的文本表示选择不同的输出格式。

可选值：

* `kusto` - KQL 风格的输出格式。

  ClickHouse 以 [KQL 格式](https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-timespan-format-strings#the-constant-c-format-specifier)输出时间间隔。例如，`toIntervalDay(2)` 会格式化为 `2.00:00:00`。请注意，对于长度可变的时间间隔类型 (即 `IntervalMonth` 和 `IntervalYear`) ，会按每个时间间隔的平均秒数进行换算。

* `numeric` - 数值输出格式。

  ClickHouse 将时间间隔输出为其底层的数值表示。例如，`toIntervalDay(2)` 会格式化为 `2`。

另请参阅：

* [Interval](/docs/zh/reference/data-types/special-data-types/interval)

<div id="into_outfile_create_parent_directories">
  ## into\_outfile\_create\_parent\_directories
</div>

<SettingsInfoBlock type="Bool" default_value="0" />

使用 INTO OUTFILE 时，如果父目录尚不存在，则自动创建这些父目录。

<div id="json_type_escape_dots_in_keys">
  ## json\_type\_escape\_dots\_in\_keys
</div>

<SettingsInfoBlock type="Bool" default_value="0" />

启用后，解析时会对 JSON 键中的点号进行转义。

<div id="max_dynamic_subcolumns_in_json_type_parsing">
  ## max\_dynamic\_subcolumns\_in\_json\_type\_parsing
</div>

<SettingsInfoBlock type="UInt64Auto" default_value="auto" />

在解析 JSON 列时，每列可创建的动态子列的最大数量。
它可在解析期间控制动态子列的数量，而不受数据类型中指定的动态参数影响。

<div id="precise_float_parsing">
  ## precise\_float\_parsing
</div>

<SettingsInfoBlock type="Bool" default_value="1" />

使用精确的浮点解析算法，该算法始终返回最接近输入值的可表示值。禁用后，将使用速度更快但精度较低的算法，其结果与精确结果相比，最低有效位可能会有所不同。

<div id="validate_experimental_and_suspicious_types_inside_nested_types">
  ## validate\_experimental\_and\_suspicious\_types\_inside\_nested\_types
</div>

<SettingsInfoBlock type="Bool" default_value="1" />

校验在 Array/Map/Tuple 等嵌套类型中使用实验性和可疑类型
