> ## 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.

# format_capn_* 格式设置

> ClickHouse 在 format_capn_* 生成分组中的格式设置。

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>;
};

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

<div id="format_capn_proto_enum_comparising_mode">
  ## format\_capn\_proto\_enum\_comparising\_mode
</div>

<SettingsInfoBlock type="CapnProtoEnumComparingMode" default_value="by_values" />

如何映射 ClickHouse 枚举与 CapnProto 枚举

<div id="format_capn_proto_max_message_size">
  ## format\_capn\_proto\_max\_message\_size
</div>

<SettingsInfoBlock type="UInt64" default_value="1073741824" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.12"},{"label": "1073741824"},{"label": "防止分配过多内存"}]}]} />

单个 CapnProto Message 的最大大小，以字节为单位。这可防止格式错误或损坏的数据导致过多的内存分配。默认值为 1 GiB。

<div id="format_capn_proto_use_autogenerated_schema">
  ## format\_capn\_proto\_use\_autogenerated\_schema
</div>

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

未设置 format\_schema 时，使用自动生成的 CapnProto schema
