> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-postgresql-tls-support.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# delta_lake_* 会话设置

> delta_lake_* 自动生成分组中的 ClickHouse 会话设置。

export const VersionHistory = ({rows = []}) => {
  if (rows.length === 0) {
    return null;
  }
  const headers = ["版本", "默认值", "注释"];
  const border = "1px solid rgba(128, 128, 128, 0.3)";
  const cell = {
    border,
    padding: "0.25rem 0.5rem",
    textAlign: "start",
    verticalAlign: "top"
  };
  return <details className="not-prose" style={{
    border,
    borderRadius: "0.5rem",
    margin: "0.5rem 0",
    padding: "0.5rem 0.75rem",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <summary style={{
    cursor: "pointer",
    fontWeight: 600,
    opacity: 0.72
  }}>
        版本历史
      </summary>
      <table style={{
    borderCollapse: "collapse",
    width: "100%",
    margin: "0.5rem 0 0"
  }}>
        <thead>
          <tr>
            {headers.map(header => <th key={header} style={{
    ...cell,
    fontWeight: 600,
    opacity: 0.72
  }}>
                {header}
              </th>)}
          </tr>
        </thead>
        <tbody>
          {rows.map((row, row_index) => <tr key={row.id ?? row_index}>
              {(row.items ?? []).map((item, item_index) => <td key={item_index} style={{
    ...cell,
    overflowWrap: "anywhere"
  }}>
                  {item?.label}
                </td>)}
            </tr>)}
        </tbody>
      </table>
    </details>;
};

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

这些设置可在 [system.settings](/zh/reference/system-tables/settings) 中查看，由 [source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp) 自动生成。

<div id="delta_lake_enable_engine_predicate">
  ## delta\_lake\_enable\_engine\_predicate
</div>

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

启用 delta-kernel 的内部数据裁剪。

<div id="delta_lake_enable_expression_visitor_logging">
  ## delta\_lake\_enable\_expression\_visitor\_logging
</div>

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

启用 DeltaLake 表达式访问器的测试级别日志。即使在测试日志中，这些日志也可能过于冗长。

<div id="delta_lake_insert_max_bytes_in_data_file">
  ## delta\_lake\_insert\_max\_bytes\_in\_data\_file
</div>

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

定义 Delta Lake 中单个插入数据文件的字节数上限。

<div id="delta_lake_insert_max_rows_in_data_file">
  ## delta\_lake\_insert\_max\_rows\_in\_data\_file
</div>

<SettingsInfoBlock type="NonZeroUInt64" default_value="1000000" />

定义 Delta Lake 中单个写入数据文件的行数上限。

<div id="delta_lake_log_metadata">
  ## delta\_lake\_log\_metadata
</div>

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

启用将 Delta Lake 元数据文件记录到系统表中。

<div id="delta_lake_reload_schema_for_consistency">
  ## delta\_lake\_reload\_schema\_for\_consistency
</div>

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

启用后，会在每次查询执行前从 DeltaLake 元数据 重新加载 schema，以确保
查询分析期间使用的 schema 与执行期间使用的 schema 一致。

<div id="delta_lake_snapshot_end_version">
  ## delta\_lake\_snapshot\_end\_version
</div>

<SettingsInfoBlock type="Int64" default_value="-1" />

要读取的 Delta Lake 快照 的结束版本。值 -1 表示读取最新版本 (值 0 也是有效的 快照 version) 。

<div id="delta_lake_snapshot_start_version">
  ## delta\_lake\_snapshot\_start\_version
</div>

<SettingsInfoBlock type="Int64" default_value="-1" />

要读取的 delta lake 快照起始版本。值为 -1 表示读取最新版本 (0 是有效的快照版本值) 。

<div id="delta_lake_snapshot_version">
  ## delta\_lake\_snapshot\_version
</div>

<SettingsInfoBlock type="Int64" default_value="-1" />

要读取的 Delta Lake 快照版本。值 -1 表示读取最新版本 (值 0 是有效的快照版本) 。

<div id="delta_lake_throw_on_engine_predicate_error">
  ## delta\_lake\_throw\_on\_engine\_predicate\_error
</div>

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

启用后，如果在 delta-kernel 中分析扫描谓词时出错，则会抛出异常。
