Skip to content

Docs: cross-link digits and substring function docs#111149

Merged
rschu1ze merged 2 commits into
ClickHouse:masterfrom
groeneai:groeneai/docs-digits-substring-crosslink
Jul 21, 2026
Merged

Docs: cross-link digits and substring function docs#111149
rschu1ze merged 2 commits into
ClickHouse:masterfrom
groeneai:groeneai/docs-digits-substring-crosslink

Conversation

@groeneai

@groeneai groeneai commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

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):

...

Description

Adds reciprocal "See also" cross-links between the in-source docs of digits and substring. digits(n, offset[, length]) is the numeric analogue of substring(s, offset[, length]), so each function's documentation now points to the other.

Requested by rschu1ze in #109012 (comment).

Docs-only, no behavior change. The links use the inline "See also" convention already used by scalar functions (for example initialQueryID -> other-functions#queryID, tokens -> string-functions#sparseGrams); FunctionDocumentation has no related_functions field.

Version info

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

digits(n, offset[, length]) is the numeric analogue of substring on a
string, so add reciprocal "See also" links between the in-source docs of
the two functions. Requested by @rschu1ze on PR ClickHouse#109012.

Uses the inline See-also convention already used by scalar functions
(FunctionDocumentation has no related_functions field). Docs-only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@groeneai

Copy link
Copy Markdown
Contributor Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? N/A (docs-only, no failing behavior to reproduce)
b Root cause explained? N/A as a bug. Rationale: digits is the numeric analogue of substring; maintainer directive to cross-link their in-source docs
c Fix matches root cause? Yes. Reciprocal "See also" links are exactly the ask
d Test intent preserved / new tests? N/A. No tests changed. Doc-gating tests (02415/03921) validate doc presence, not prose; both functions stay documented
e Demonstrated in both directions? N/A (no behavior). Targeted compile of both changed TUs (digits.cpp.o, substring.cpp.o) => exit 0, proving the raw-string literals stay well-formed
f General, not a narrow patch? Reciprocal in BOTH directions (digits->substring and substring->digits) = full scope of the directive
g Generalizes across inputs/wrappers? N/A (no type-dependent code path). substringUTF8 intentionally not linked: the directive named substring only, so the link lives on the canonical byte-variant doc
h Backward compatible? Yes. Docs text only; no setting/format/wire change
i Invariants/contracts preserved? Yes. No code contract touched; added text contains no )" so raw-string literals remain valid

Session id: cron:clickhouse-author-slot-0:20260720-214300

@groeneai

Copy link
Copy Markdown
Contributor Author
Internal second-model review (click to expand)

An independent second model reviewed this diff before it was opened.

  • ❌ Blockers: none
  • ⚠️ Majors: none
  • 💡 Nits: none

Verdict: 0 findings. The change is a docs-only addition of two reciprocal
"See also" links inside existing FunctionDocumentation::Description string
literals; both changed translation units compile, and the guarded diff is
exactly the two intended files with no submodule drift.

@Blargian Blargian self-assigned this Jul 21, 2026
@Blargian Blargian added the can be tested Allows running workflows for external contributors label Jul 21, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [31a71ec]

Summary:


AI Review

Summary

This PR adds reciprocal See also cross-links between the in-source docs for digits and substring. I found no review findings in the current head: the new links follow the same extensionless route style already used by other FunctionDocumentation entries, and the target pages/categories match the generated docs slugs (/sql-reference/functions/string-functions#substring and /sql-reference/functions/other-functions#digits). Residual risk is limited to docs rendering, which I did not rebuild locally.

Final Verdict

Status: ✅ Approve

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

Copy link
Copy Markdown
Contributor Author

CI finish ledger - ae7c776

This is a docs-only change (2 files, +4 lines in FunctionDocumentation string literals in digits.cpp and substring.cpp). None of the failures below can be caused by the diff. Every failure has an owner.

Check / test Reason Owner / fixing PR
Integration tests (amd_asan_ubsan db-disk old-analyzer 3/6; amd_msan 7/8; amd_tsan 3/6) / test_replicated_database::test_replicated_table_structure_alter chronic flaky (1212 hits / 539 PRs / 107 master in 30d) #111029 (fixing PR, open)
Stateless (amd_llvm_coverage, ParallelReplicas, s3) / Logical error: Got read request from replica 1 for unknown stream ... (STID 5217-5b3d) chronic trunk bug (33 hits / 31 PRs / 2 master in 30d) a full-effort fix task owns it (root-caused: Default-mode announce-vs-request registration race in ParallelReplicasReadingCoordinator; blocked on the #109202 WONTFIX ruling, re-engaged with falsifying master evidence)
Stateless (amd_llvm_coverage, ParallelReplicas, s3) / 01271_show_privileges ERROR + Server died crash victims of the STID 5217-5b3d abort above (same job/commit: "server is shutting down due to a fatal error (ABORTED)") same as above
CH Inc sync - CH Inc sync (private, not actionable)

Session id: cron:our-pr-ci-monitor:20260721-093000

@clickhouse-gh

clickhouse-gh Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.20% 86.20% +0.00%
Functions 92.00% 92.00% +0.00%
Branches 78.30% 78.30% +0.00%

Changed lines: Changed C/C++ lines covered: 13/13 (100.00%) · Uncovered code

Full report · Diff report

@rschu1ze
rschu1ze added this pull request to the merge queue Jul 21, 2026
Merged via the queue into ClickHouse:master with commit 1fb7d96 Jul 21, 2026
180 checks passed
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors 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.

4 participants