Repository navigation
Do not call the analyzer "new" - #110160
Conversation
…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]>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
Workflow [PR], commit [603b703] Summary: ✅
AI ReviewSummaryThis PR removes the Findings
Final VerdictNeeds changes: the wording sweep is mostly complete, but the new style check still has a concrete false-negative for a wrapped banned phrase. |
…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]>
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.
…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 | |
There was a problem hiding this comment.
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.
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 29/30 (96.67%) · Uncovered code |
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]>
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]>
…-wording Do not call the analyzer "new"
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]>
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:
enable_analyzerandanalyzer_compatibility_prefer_alias_over_subcolumnsetting descriptions inSettings.cpp, mirrored into the autogenerated settings reference.04098and04312tests echo the touched text into their output, so their.referencefiles were updated too.Deliberately left untouched: historical changelogs (
CHANGELOG.md, the versioned release notes underdocs/changelogsanddocs/**/resources/changelogs, and the aggregatedchangelog.md/changelog.mdxfiles). They are a fixed record of past releases, and the style check excludes exactly those files (likewise theprivate-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 insidechangelogs/directories and docs whose path merely contains the substringchangelog.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 asuse_new_analyzerare intentionally not matched. Besides the adjacent forms, it also catches the split phrasing "new and (the) old analyzer".Changelog category (leave one):
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
26.7.1.965(included in26.7and later)