Skip to content

Do not call the analyzer "new" - #110160

Merged
alexey-milovidov merged 20 commits into
masterfrom
analyzer-not-new-wording
Jul 15, 2026
Merged

alexey-milovidov merged 20 commits into
masterfrom
analyzer-not-new-wording

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Jul 12, 2026 •

Copy link
Copy Markdown
Member

The analyzer has been enabled by default since ClickHouse 24.3, so it is no longer new. This removes the "new analyzer" / "new query analyzer" wording from documentation and comments (using "the analyzer" or "Analyzer" instead) and adds a style check so the wording does not come back.

Scope of the fix:

  • Real documentation (the analyzer guide, the parallel-replicas page, the performance-optimizations snippet).
  • Source-code comments.
  • The enable_analyzer and analyzer_compatibility_prefer_alias_over_subcolumn setting descriptions in Settings.cpp, mirrored into the autogenerated settings reference.
  • Test comments. The 04098 and 04312 tests echo the touched text into their output, so their .reference files were updated too.

Deliberately left untouched: historical changelogs (CHANGELOG.md, the versioned release notes under docs/changelogs and docs/**/resources/changelogs, and the aggregated changelog.md/changelog.mdx files). They are a fixed record of past releases, and the style check excludes exactly those files (likewise the private-changelogs/ release records of the private repository, where the check also runs on the synced tree). Live pages stay enforced, including the landing/status/security pages that sit inside changelogs/ directories and docs whose path merely contains the substring changelog.

The new check lives in ci/jobs/scripts/check_style/various_checks.sh. Its pattern requires a space or hyphen between the words, so code identifiers such as use_new_analyzer are intentionally not matched. Besides the adjacent forms, it also catches the split phrasing "new and (the) old analyzer".

Changelog category (leave one):

  • Documentation (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Stopped referring to the analyzer as "new" in documentation and comments (it has been the default since 24.3), and added a style check to enforce this.

🤖 Generated with Claude Code

Version info

  • Merged into: 26.7.1.965 (included in 26.7 and later)

alexey-milovidov and others added 2 commits July 12, 2026 02:08
…hmetic

A distilled, committed form of the 57898-query battery used to verify
that mixed-type-pair kernels can be executed via conversion to a common
type. The original battery ran one query per expression and took about
half an hour; these tests batch all expressions of a type pair into a
single wide row, which gives the same instantiation-path coverage
(every pair in both directions, every operator, every combination of
constant and non-constant arguments, result types, zero divisors,
minimal-signed-number corners) and runs in about a second per file.

- 04513: comparison of every (Decimal-like, numeric) pair with all six
  operators; date/time pairs that go through the decimal machinery;
  same-type scale-mixed controls.
- 04514: arithmetic over every mixed pair involving a 128/256-bit
  integer: +, -, *, /, intDiv, modulo, positiveModulo, moduloLegacy and
  their OrZero/OrNull variants, with result types pinned per pair.
- 04515: the exceptional cases - comparison scale-conversion overflow
  (and its behavior with decimal_check_overflow = 0), division by zero
  in every width direction, division of the minimal signed number by
  minus one for wide and narrow dividends, positiveModulo by the most
  negative divisor, invalid float-with-wide-integer combinations.

The references were generated with a clean build of master and verified
to be identical on a build with the conversion-based kernels.
The analyzer has been enabled by default since ClickHouse 24.3, so it is
no longer new. Stop describing it as "new analyzer" / "new query analyzer"
in documentation and comments; use "the analyzer" or "Analyzer" instead.

Fixed the wording in the real documentation, in source-code comments, in
the `enable_analyzer` and `analyzer_compatibility_prefer_alias_over_subcolumn`
setting descriptions in `Settings.cpp` (and the autogenerated settings
reference), and in test comments. The `04098` and `04312` tests echo the
touched text into their output, so their `.reference` files were updated too.

Historical changelogs (`CHANGELOG.md`, `docs/changelogs`,
`docs/**/resources/changelogs`) are intentionally left untouched: they are a
fixed record of past releases.

Added a style check in `various_checks.sh` that forbids the "new analyzer" /
"new query analyzer" wording in docs and comments going forward. The pattern
requires a space or hyphen between the words, so code identifiers such as
`use_new_analyzer` are not matched, and changelog paths are excluded.

Co-Authored-By: Claude Fable 5 <[email protected]>
@mintlify

mintlify Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
ClickHouse-docs 🟡 Building – Jul 12, 2026, 2:46 PM

@clickhouse-gh

clickhouse-gh Bot commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [603b703]

Summary: ✅


AI Review

Summary

This PR removes the new analyzer / new query analyzer wording from docs, comments, settings text, and touched test fixtures, and adds a style check to keep that wording from coming back. Most of the cleanup is consistent with the stated goal, but the new multiline grep -z fallback still leaves one wrapped variant of the banned phrasing unguarded, so the review is not yet ready to approve.

Findings

⚠️ Majors

  • [ci/jobs/scripts/check_style/various_checks.sh:298] The new checker still lets new and (the) old analyzer slip through if the wrap happens before analyzer. The single-line regex on line 293 catches new and the old analyzer, but the multiline fallback only accepts new (optionally query) before the newline, so new and the old\nanalyzer is not flagged. Extend the -z pattern with the same optional and (the )?old group so the split phrasing cannot come back via wrapped comments.
Final Verdict

Needs changes: the wording sweep is mostly complete, but the new style check still has a concrete false-negative for a wrapped banned phrase.

@clickhouse-gh clickhouse-gh Bot added the pr-documentation Documentation PRs for the specific code PR label Jul 12, 2026

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

…commit

This branch was created on top of the unmerged commit `9932ab0ab21`
("Add tests for the full matrix of mixed-type-pair comparisons and
arithmetic"), which dragged the `04513`-`04515` type-pair-matrix tests
into this documentation-only pull request. Those tests belong to a
separate pull request (they add `04513`/`04514`/`04515`), and their
presence here made the `Documentation` changelog category and the
description inaccurate and caused the flaky check to fail on
`04513_type_pair_matrix_comparison` ("Test runs too long").

Remove them so this pull request contains only the analyzer-wording
changes it describes. This also resolves the `clickhouse-gh` review
findings asking to drop the slipped-in test commit.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… execution guide

The old architecture is not waiting for the analyzer to become "generally
available" — the analyzer has been the default since `24.3`. State the
actual status instead: the current architecture is the default, and the
old one (`enable_analyzer=0`) is deprecated and kept only for backward
compatibility.

Co-Authored-By: Claude Fable 5 <[email protected]>
alexey-milovidov and others added 2 commits July 12, 2026 21:46
The wording cleanup left equivalent "new" phrases in the touched analyzer
documentation, making it internally inconsistent with the rest of the change:

- `understanding-query-execution-with-the-analyzer.mdx`: the `<Note>` still
  said "The new architecture should provide..." and "revert back to the old
  analyzer"; the surrounding text already calls it "the current architecture"
  and "the old architecture", so this now matches.
- `analyzer.md` and `analyzer.mdx`: "In the new version of the analyzer, the
  rules for..." now reads "In the analyzer, the rules for...", matching the
  preceding sentence in the same section.

Reported by the AI review and the `clickhouse-gh` inline thread on
#110160

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The `new analyzer` / `new query analyzer` style check added by this PR now
also applies to code that reached master since the branch was created. Merging
master pulled in six such occurrences (in `TreeOptimizer.cpp` and the
`optimize_or_like_chain` / low-cardinality-tuple stateless tests) that would
otherwise trip the newly added check. Reword them to drop "new", keeping the
old-vs-current-analyzer contrast where it matters, so the check passes on the
merged tree.
…ding check

The `new analyzer` style check excluded every path containing the substring
`changelog` via `grep -vi 'changelog'`. That was broader than intended: it also
skipped live documentation such as `docs/**/system-tables/keeper_changelogs.md`
and `docs/changelog_entry_guidelines.md`, so `new analyzer` wording could
reappear there without tripping CI.

Anchor the exclusion to the actual historical changelog locations instead - the
`changelogs/` directories (covering both `docs/changelogs/` and the localized
`docs/**/resources/changelogs/` release notes) and the aggregated
`changelog.md`/`changelog.mdx` files (`docs/_includes/content/changelog.md` and
the private-product `changelog.mdx`). Live docs, code, and tooling whose path
merely contains the substring `changelog` are now enforced again.

Verified: the full check still reports zero violations across the repository,
`keeper_changelogs.md` and `changelog_entry_guidelines.md` are back in the
enforced set, and the historical changelog records remain excluded.
alexey-milovidov and others added 3 commits July 13, 2026 15:30
…r wording check

The previous exclusion `(^|/)(changelogs/|changelog\.mdx?$)` dropped every file
under `changelogs/` directories, including live pages that are not fixed
historical records: `index.mdx`, `release-notes-index.mdx`, `release-status.mdx`
and `security-changelog.mdx` under `docs/**/resources/changelogs/`. Now only the
versioned release-note files (filenames starting with a digit or `v<digit>`)
inside `changelogs/` directories and the aggregated `changelog.md`/`changelog.mdx`
files are excluded, so those 36 live pages (9 languages) are enforced again.
Verified the full check still reports zero violations across the repository.

Co-Authored-By: Claude Fable 5 <[email protected]>
…rrived from master

The merge of master brought the new setting
`analyzer_compatibility_allow_non_aggregate_in_having`, whose descriptions in
`Settings.cpp` and `SettingsChangesHistory.cpp` said "the new analyzer" and
would have failed the style check added by this PR.

Co-Authored-By: Claude Fable 5 <[email protected]>
…n the wording check

The check for "new analyzer" wording only matched the adjacent forms
("new analyzer", "new query analyzer"), so the phrase "for both the new
and the old analyzer" survived in the comments of tests 04493 and 04500.
Reword those two comments and widen the pattern with an optional
"and (the) old" between "new" and "analyzer", so the split phrasing
cannot come back either. Verified against the whole enforced file set:
zero violations.
…zer wording check

The "CH Inc sync" check runs the same style check on the synced tree of
the private repository, which keeps its historical release records in
docs/private-changelogs/ (e.g. 24.4-chamaeleon.md). Those files did not
match the changelogs/ exclusion, so the wording check failed there
("build failed" on the sync status). Allow an optional "private-" prefix
on the directory name, keeping the versioned-filename constraint, so
live pages remain enforced. Verified against the private master tree:
all remaining matches in enforced files are lines inherited from the
public repository that this PR already rewords, so the merged tree is
clean.
…ing check

The private repository also has release records named by release
codename without a version prefix (e.g. pegasus.md, taurus.md, and the
accumulating pending.md), which the versioned-filename constraint did
not cover, so the check still failed on the synced tree. The directory
contains nothing but release records - no live pages - so excluding it
as a whole is precise. The public changelogs/ directories keep the
versioned-filename constraint because they also host live pages.
Verified by running the check against the actual merge tree of the sync
PR: zero violations.
…check

The wording check in `various_checks.sh` was line-oriented, so it missed
occurrences where a comment wraps and "new" ends one line while "analyzer"
continues on the next (possibly after a comment leader such as `--`, `#`,
`//` or `*`). Three touched tests still had that split form:
`04141_text_index_alias_lambda_with_constants.sql`,
`04204_global_in_join_max_rows_to_transfer_103333.sql`, and
`04327_lazy_materialization_topk_filter_column_position.sql`.

Reword those comments to drop "new", and add a second grep pass in `-z`
mode (each file treated as one record) anchored to exactly one newline, so
the wrapped form is caught without matching a distant "new" and "analyzer"
that merely share a file. Verified against the whole enforced file set:
zero violations.
The merge of master brought in two new stateless tests whose comments
still describe the analyzer as "new", which this PR's own style check in
`ci/jobs/scripts/check_style/various_checks.sh` correctly flags:

- `04370_distinct_combinator_correlated_subquery_group_by_use_nulls.sql`
  ("Correlated subqueries are a new-analyzer feature" -> "an analyzer feature")
- `04512_lowcardinality_const_key_distributed_merge_aggregation.sql`
  ("QUALIFY is only supported by the new analyzer" -> "by the analyzer")

Both are pure `--` comment lines and neither is echoed into its
`.reference` file, so the test output is unaffected. After the reword the
wording check reports 0 violations repo-wide.
# so the pattern can match across the line break; it is anchored to exactly one newline to
# avoid matching a distant "new" and "analyzer" that merely appear in the same file.
echo "$analyzer_wording_files" |
xargs grep -HoPz '\bnew\b[ \t]*(query[ \t]*)?\n[ \t]*([-#*/;]+[ \t]*)?(query[ \t]*)?analyzer\b' 2>/dev/null |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This multiline fallback still misses the new and (the) old analyzer variant if the wrap happens before analyzer. With the current patterns, new and the old analyzer is caught on one line, but new and the old\nanalyzer passes because line 293 is line-oriented and this -z regex only allows new (optionally query) before the newline.

That leaves a wrapped escape hatch for the exact split phrasing the PR body says is banned. Please carry the optional and (the )?old group into the newline-aware regex as well.

@clickhouse-gh

clickhouse-gh Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 85.90% 85.80% -0.10%
Functions 92.70% 92.70% +0.00%
Branches 78.00% 78.00% +0.00%

Changed lines: Changed C/C++ lines covered: 29/30 (96.67%) · Uncovered code

Full report · Diff report

@alexey-milovidov
alexey-milovidov merged commit 49b910d into master Jul 15, 2026
174 of 175 checks passed
@alexey-milovidov
alexey-milovidov deleted the analyzer-not-new-wording branch July 15, 2026 00:36
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 15, 2026
pull Bot pushed a commit to Lobinson1/ClickHouse that referenced this pull request Jul 15, 2026
The repo-wide style rule rejecting the "new analyzer" wording (ClickHouse#110160)
and the test 04402_with_fill_interpolate_fill_column_overlap.sql with a
"The new analyzer materializes ..." comment (ClickHouse#110103) were merged
independently, each with CI that predated the other, so every branch
containing both now fails "Style check". Reword the comment to
"The analyzer materializes ..." as the rule suggests. This is the only
occurrence in the repository.

Co-Authored-By: Claude Fable 5 <[email protected]>
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
The wording cleanup left equivalent "new" phrases in the touched analyzer
documentation, making it internally inconsistent with the rest of the change:

- `understanding-query-execution-with-the-analyzer.mdx`: the `<Note>` still
  said "The new architecture should provide..." and "revert back to the old
  analyzer"; the surrounding text already calls it "the current architecture"
  and "the old architecture", so this now matches.
- `analyzer.md` and `analyzer.mdx`: "In the new version of the analyzer, the
  rules for..." now reads "In the analyzer, the rules for...", matching the
  preceding sentence in the same section.

Reported by the AI review and the `clickhouse-gh` inline thread on
ClickHouse#110160

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
The repo-wide style rule rejecting the "new analyzer" wording (ClickHouse#110160)
and the test 04402_with_fill_interpolate_fill_column_overlap.sql with a
"The new analyzer materializes ..." comment (ClickHouse#110103) were merged
independently, each with CI that predated the other, so every branch
containing both now fails "Style check". Reword the comment to
"The analyzer materializes ..." as the rule suggests. This is the only
occurrence in the repository.

Co-Authored-By: Claude Fable 5 <[email protected]>

This branch was successfully deployed

1 active deployment
staging - docs — 603b7036 Deployed Jul 14, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-documentation Documentation PRs for the specific code PR pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants