Skip to content

Trim verbose comments in 04549_text_index_prewhere_where_dup_over_merge_distributed - #111716

Merged
nikitamikhaylov merged 1 commit into
ClickHouse:masterfrom
groeneai:fix-04549-trim-slob-comments
Jul 24, 2026
Merged

nikitamikhaylov merged 1 commit into
ClickHouse:masterfrom
groeneai:fix-04549-trim-slob-comments

Conversation

@groeneai

@groeneai groeneai commented Jul 24, 2026 •

Copy link
Copy Markdown
Collaborator

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

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

...

Description

Follow-up to the review on the merged #110710: the test file carried long block comments
explaining the root cause and the setting-pin rationale. Per reviewer feedback I moved that
narrative to this commit message and kept only short inline notes on the two non-obvious pins.

The executable SQL is byte-for-byte identical to the current test (verified: non-comment lines
diff empty against HEAD); the .reference is unchanged. No behavior change.

Root cause the removed comments described (kept here for the record):
optimizeDirectReadFromTextIndex registered the synthetic __text_index_..._has_<hash> read
column twice for one reading step when the same text-index predicate appears in both PREWHERE and
WHERE over a Merge -> Distributed -> MergeTree plan (the step is optimized on more than one pass),
aborting the pipeline build with "Column ... already added for reading" (issue #110697, fixed by
#110710). Two settings are pinned because the runner randomizes them: prefer_localhost_replica = 1
(the whole plan must be built on the local initiator to reach the double registration) and
query_plan_direct_read_from_text_index = 1 (randomized off ~5%; the abort only fires with direct
read enabled).

Version info

  • Merged into: 26.8.1.110 (included in 26.8 and later)

…ge_distributed

Follow-up to the review on the merged ClickHouse#110710: the test carried long block comments
explaining the root cause and the setting-pin rationale. Moved that narrative here and
kept only short inline notes on the two non-obvious pins. Executable SQL and .reference
are unchanged; no behavior change.

Root cause the removed comments described: optimizeDirectReadFromTextIndex registered the
synthetic __text_index_..._has_<hash> read column twice for one reading step when the same
text-index predicate appears in both PREWHERE and WHERE over a Merge -> Distributed ->
MergeTree plan (the step is optimized on more than one pass), aborting pipeline build with
"Column ... already added for reading" (issue ClickHouse#110697, fixed by ClickHouse#110710).

The two pinned settings are randomized by the test runner: prefer_localhost_replica = 1
(the whole plan must be built on the local initiator to reach the double registration) and
query_plan_direct_read_from_text_index = 1 (randomized off ~5%; the abort only fires with
direct read enabled).
@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? N/A. Comment-only change; the bug (#110697) is already fixed and merged in #110710.
b Root cause explained? Yes. The review flagged verbose "slob comments" duplicating root-cause and pin rationale that belongs in the commit message.
c Fix matches root cause? Yes. Comments trimmed to short pin notes; the full narrative moved to the commit message.
d Test intent preserved? Yes. Executable SQL is byte-for-byte identical to HEAD (non-comment lines diff empty); .reference unchanged; every assertion preserved.
e Demonstrated in both directions? N/A (no bug). The trimmed test still passes locally (clickhouse-local output 2/1/0/1/1/1 == .reference) and the SQL is unchanged.
f Fix general, not a narrow patch? N/A (not a code bug).
g Fix generalizes across inputs? N/A (not a code bug).
h Backward compatible? N/A (test comments only; no behavior, format, or setting change).
i Invariants/contracts preserved? Yes. No executable change, so all test invariants hold.

Session id: cron:clickhouse-author-slot-4:20260724-020001

@groeneai

Copy link
Copy Markdown
Collaborator Author
Internal second-model review — adjudication log (click to expand)

Pre-publication review by an independent model (engine: codex; 2 findings across two rounds;
bounded: 1 full pass + 1 fix round + 1 delta recheck).

# Sev Finding Verdict Evidence / action
1 💡 Literal ClickHouse names in the new comments are not backticked (query_plan_direct_read_from_text_index, WHERE, splitByNonAlpha) AGREE — fixed @ ed8e2e2 Backticked the three literals. Comment-only; executable SQL still byte-for-byte identical to the base (verified empty non-comment diff).
2 ⚠️ An unrelated Keeper config change (programs/server/config.d/keeper_port.xml symlink -> regular file, ports) is present DISAGREE That file is a local test-harness runtime artifact and is NOT part of this PR (gh pr diff --name-only shows only the one .sql). Nothing to change.

Severity: blocker / major / nit. DISAGREE verdicts carry recorded evidence and are terminal per finding.

Session id: cron:clickhouse-author-slot-4:20260724-020001

@PedroTadim PedroTadim added the can be tested Allows running workflows for external contributors label Jul 24, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [ed8e2e2]

Summary: ✅


AI Review

Summary

This PR trims verbose comments in tests/queries/0_stateless/04549_text_index_prewhere_where_dup_over_merge_distributed.sql after #110710 without changing executable SQL. I verified that the non-comment lines are identical to master, the touched file content matches the PR head blob, and the Praktika report for PR 111716 shows no failed jobs; I did not find any new issue that warrants an inline review comment.

Final Verdict

✅ No new findings.

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Jul 24, 2026
@nikitamikhaylov nikitamikhaylov self-assigned this Jul 24, 2026
@nikitamikhaylov
nikitamikhaylov added this pull request to the merge queue Jul 24, 2026
Merged via the queue into ClickHouse:master with commit eff85bb Jul 24, 2026
179 checks passed
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 24, 2026
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…b-comments

Trim verbose comments in 04549_text_index_prewhere_where_dup_over_merge_distributed
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-ci 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