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

# analyzer_compatibility_* セッション設定

> analyzer_compatibility_* によって生成されたグループ内の 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>;
};

これらの設定は [system.settings](/docs/ja/reference/system-tables/settings) で確認でき、[ソース](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp) から自動生成されています。

<div id="analyzer_compatibility_allow_compound_identifiers_in_unflatten_nested">
  ## analyzer\_compatibility\_allow\_compound\_identifiers\_in\_unflatten\_nested
</div>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.8"},{"label": "1"},{"label": "新しい設定"}]}]} />

Nested に複合 Identifier を追加できるようにします。これはクエリ結果が変わるため、互換性設定です。無効にすると、`SELECT a.b.c FROM table ARRAY JOIN a` は動作せず、`SELECT a FROM table` の結果にも `a.b.c` カラムは `Nested a` に含まれません。

<div id="analyzer_compatibility_allow_non_aggregate_in_having">
  ## analyzer\_compatibility\_allow\_non\_aggregate\_in\_having
</div>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.7"},{"label": "0"},{"label": "新しい互換性設定です。有効にすると、アナライザは `NOT_AN_AGGREGATE` を返す代わりに、非集約の AND 条件に対して従来の `HAVING` から `WHERE` への書き換えを再現します。"}]}]} />

有効にすると、アナライザは `NOT_AN_AGGREGATE` を返す代わりに、非集約の AND 条件を `HAVING` から `WHERE` に移動する従来の動作を再現します。デフォルトでは標準準拠の拒否動作が使われます。これは、古いアナライザ (`enable_analyzer = 0`) で暗黙的に受け入れられていたクエリのための移行支援です。集約関数、`grouping`、または非決定論的関数を含む条件は `HAVING` に残ります。いずれかの条件にウィンドウ関数または stateful function (たとえば `rowNumberInBlock`) が含まれている場合、書き換えは `HAVING` 全体で無効になり、従来の `PredicateExpressionsOptimizer` の動作と一致します。また、`GROUP BY` で `WITH CUBE`、`WITH ROLLUP`、`WITH TOTALS`、または `GROUPING SETS` を使用している場合、この設定は無視されます。

<div id="analyzer_compatibility_join_using_top_level_identifier">
  ## analyzer\_compatibility\_join\_using\_top\_level\_identifier
</div>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.3"},{"label": "0"},{"label": "JOIN USING 内のIdentifierを projection から解決するよう強制する"}]}]} />

JOIN USING 内のIdentifierを projection から解決するよう強制します (たとえば、`SELECT a + 1 AS b FROM t1 JOIN t2 USING (b)` では、`t1.b = t2.b` ではなく `t1.a + 1 = t2.b` で JOIN が実行されます) 。

<div id="analyzer_compatibility_prefer_alias_over_subcolumn">
  ## analyzer\_compatibility\_prefer\_alias\_over\_subcolumn
</div>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.6"},{"label": "0"},{"label": "新しい互換性設定"}]}]} />

`b.id` のような複合Identifierが、エイリアス `b` を持つテーブルのカラム `id` としても、別のカラムの Tuple サブカラム `b.id` としても解釈できる場合は、エイリアスのプレフィックスとしての解釈 (`b` のカラム `id`) を優先します。デフォルトでは、アナライザはサブカラムを優先します。以前のアナライザの解決に合わせるには、これを有効にします。
