Skip to content

Revert "Revert "Test the ESCAPE route into the ngram LIKE-pattern tokenizer"" - #121136

Merged
alexey-milovidov merged 2 commits into
masterfrom
revert-121135-revert-118279-groeneai/ngrams-tokenizer-escape-pair-restart
Sep 20, 2026
Merged

alexey-milovidov merged 2 commits into
masterfrom
revert-121135-revert-118279-groeneai/ngrams-tokenizer-escape-pair-restart

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Sep 20, 2026 •

Copy link
Copy Markdown
Member

Reverts #121135, i.e. re-lands #118279, with the assertion
that broke master fixed.

#118279 added two granule-count assertions of the form
SELECT trimLeft(explain) FROM (EXPLAIN indexes = 1 ...) WHERE explain LIKE '%Granules: %/%'.
EXPLAIN renders the query plan as a tree by default
(explain_query_plan_default = 'pretty'), and the detail lines of a step that is not a last
child carry the box-drawing prefix │ rather than spaces, which trimLeft does not remove.
Under parallel replicas the read step gains a sibling, so the assertion printed
│ Granules: 1/3 instead of Granules: 1/3 and
05147_ngrambf_like_escaped_backslash_run failed on master in
Stateless tests (amd_llvm_coverage, ParallelReplicas, s3 storage, parallel). The granule
counts themselves were the expected ones - only the rendering differed, so nothing about the
ngrambf_v1/text index behaviour the test pins was wrong.

The assertions now use extract(explain, 'Granules: [0-9]+/[0-9]+'), which is what the other
granule-count assertions in the suite already do and which no plan shape can disturb.

CI report for the master failure:
https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=d3977b57a22125c066894165def6c8ad1ea474d4&name_0=MasterCI&name_1=Stateless%20tests%20%28amd_llvm_coverage%2C%20ParallelReplicas%2C%20s3%20storage%2C%20parallel%29

Related: #118279
Related: #121135

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/121136]

Version info

  • Merged into: 26.10.1.291-master (included in 26.10 and later)

@clickhouse-gh

clickhouse-gh Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [86cdfb1]

Summary: ✅


AI Review

Summary

This PR re-lands the LIKE ... ESCAPE regression coverage for the ngrambf_v1 path and the text(tokenizer = ngrams) fallback path, and it fixes the follow-up flake by extracting the Granules: N/M substring instead of depending on EXPLAIN tree indentation. I did not find a correctness, coverage, or renewed flakiness issue in the current diff.

Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Sep 20, 2026
The two granule-count assertions in
`05147_ngrambf_like_escaped_backslash_run` read `trimLeft(explain)` over
`EXPLAIN indexes = 1` filtered by `explain LIKE '%Granules: %/%'`. `EXPLAIN`
renders the query plan as a tree by default
(`explain_query_plan_default = 'pretty'`), and the detail lines of a step that
is not a last child carry the box-drawing prefix `│  ` rather than spaces,
which `trimLeft` does not remove.

Under parallel replicas the read step gains a sibling, so the assertion printed
`│               Granules: 1/3` instead of `Granules: 1/3` and the test failed
on master in `Stateless tests (amd_llvm_coverage, ParallelReplicas, s3 storage,
parallel)`. The granule counts themselves were the expected ones - only the
rendering differed.

Use `extract(explain, 'Granules: [0-9]+/[0-9]+')`, which is what the other
granule-count assertions in the suite already do and which no plan shape can
disturb.

https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=d3977b57a22125c066894165def6c8ad1ea474d4&name_0=MasterCI&name_1=Stateless%20tests%20%28amd_llvm_coverage%2C%20ParallelReplicas%2C%20s3%20storage%2C%20parallel%29

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@clickhouse-gh clickhouse-gh Bot added the comp-testing Test content only (no production code). label Sep 20, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Sep 20, 2026
@alexey-milovidov alexey-milovidov self-assigned this Sep 20, 2026
Merged via the queue into master with commit abdf6f1 Sep 20, 2026
176 checks passed
@alexey-milovidov
alexey-milovidov deleted the revert-121135-revert-118279-groeneai/ngrams-tokenizer-escape-pair-restart branch September 20, 2026 18:07
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 20, 2026
@clickhouse-gh clickhouse-gh Bot added comp-text-index Full-text search: inverted/text index in MergeTree (tokenizers, posting lists, GIN-style index bu... and removed comp-testing Test content only (no production code). labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-text-index Full-text search: inverted/text index in MergeTree (tokenizers, posting lists, GIN-style index bu... pr-not-for-changelog This PR should not be mentioned in the changelog 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.

2 participants