Skip to content

Increase coverage for text index postprocessor fast path for #111509 - #111649

Merged
rschu1ze merged 3 commits into
masterfrom
111509-follow-up
Jul 24, 2026
Merged

rschu1ze merged 3 commits into
masterfrom
111509-follow-up

Conversation

@rschu1ze

@rschu1ze rschu1ze commented Jul 23, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #111509

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Version info

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

@clickhouse-gh

clickhouse-gh Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [ec009c5]

Summary: ✅


AI Review

Summary

This PR extends 02346_text_index_postprocessor_in_filter with a keep-on-match if(token IN (...), token, '') case to improve coverage for the text-index postprocessor fast path. The added SQL does validate the end-to-end token semantics, but it still does not prove that the fast-path extractor matched that spelling, and it leaves the NOT IN keep-on-match quadrant uncovered.

Findings

⚠️ Majors

  • [tests/queries/0_stateless/02346_text_index_postprocessor_in_filter.sql:40] The new case still does not protect the fast-path contract it is meant to cover. If MergeTreeIndexTextPostprocessor::getInlineFilter() stops recognizing the keep-on-match spelling, MergeTreeIndexAggregatorText::update falls back to the generic processTokensArrayBatch path and produces the same dictionary and hasToken results, so this test stays green. The follow-up also covers only if(token IN (...), token, ''); the if(token NOT IN (...), token, '') branch where filter.drop_on_match flips for drop_on_condition = false remains untested.
    Suggested fix: add a focused unit-style test (or another fast-path-only assertion) that verifies getInlineFilter() is non-null and shouldDrop() behaves correctly for both IN and NOT IN when token is in the then-branch.
Final Verdict

Status: ⚠️ Request changes

Minimum required action: add a focused assertion that proves the keep-on-match IN/NOT IN spellings are recognized by the optimized inline-filter path, rather than only rechecking the final token contents.

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jul 23, 2026
CREATE TABLE tab_in_reversed (
id UInt32,
s String,
INDEX idx(s) TYPE text(tokenizer = 'splitByNonAlpha', postprocessor = if(s IN ('the', 'a', 'is'), s, ''))

This comment was marked as low quality.

@rschu1ze
rschu1ze added this pull request to the merge queue Jul 24, 2026
Merged via the queue into master with commit b4f294c Jul 24, 2026
178 checks passed
@rschu1ze
rschu1ze deleted the 111509-follow-up branch July 24, 2026 14:12
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 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
Increase coverage for text index postprocessor fast path for ClickHouse#111509
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants