Skip to content

Fix not ready set in text index analysis - #100224

Merged
alexey-milovidov merged 1 commit into
ClickHouse:masterfrom
CurtizJ:fix-not-ready-set
Mar 21, 2026
Merged

alexey-milovidov merged 1 commit into
ClickHouse:masterfrom
CurtizJ:fix-not-ready-set

Conversation

@CurtizJ

@CurtizJ CurtizJ commented Mar 20, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

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

Fixed "Not-ready Set is passed as the second argument" errors during analysis of text index built on top of mapValues for predicates that contain IN clause.

In addition to #99286.

Version info

  • Backported to: 26.2.6.8

@clickhouse-gh

clickhouse-gh Bot commented Mar 20, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [107ba51]

Summary: ✅


AI Review

Summary

This PR fixes a real analyzer-time exception in text index analysis for IN predicates over map elements by preparing Set inputs before evaluating the cloned predicate DAG in traverseMapElementKeyNode. The implementation is focused and consistent with existing FutureSet handling patterns, and the new stateless test reproduces and validates the regression scenario.

Missing context

  • ⚠️ No CI/Praktika report links or logs were provided in this review context, so I could not independently verify full CI signal.

ClickHouse Rules

Item Status Notes
Deletion logging ➖
Serialization versioning ➖
Core-area scrutiny ✅
No test removal ✅
Experimental gate ➖
No magic constants ✅
Backward compatibility ✅
SettingsChangesHistory.cpp ➖
PR metadata quality ✅
Safe rollout ✅
Compilation time ✅

Final Verdict

  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Mar 20, 2026
@clickhouse-gh

clickhouse-gh Bot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 83.80% 83.70% -0.10%
Functions 24.00% 24.00% +0.00%
Branches 76.30% 76.30% +0.00%

PR changed lines: PR changed-lines coverage: 88.89% (16/18, 0 noise lines excluded)
Diff coverage report
Uncovered code

@george-larionov george-larionov self-assigned this Mar 20, 2026

@george-larionov george-larionov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Mar 21, 2026
Merged via the queue into ClickHouse:master with commit b53656a Mar 21, 2026
148 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 Mar 21, 2026
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Mar 21, 2026
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Mar 21, 2026
clickhouse-gh Bot added a commit that referenced this pull request Mar 21, 2026
Backport #100224 to 26.2: Fix not ready set in text index analysis
fm4v added a commit that referenced this pull request Mar 21, 2026
…tion

When a PR changes a C++ source file, tests that cover sibling files
(same directory, same functional domain) are now included as additional
candidates, ranked below direct hits (SIBLING_DIR_WIDTH=10000).

Problem solved: for PR #100150 (Arrow writer UUID fix), the 16 directly
selected tests all covered CHColumnToArrowColumn.cpp (the writer), but
32 additional tests cover ArrowColumnToCHColumn.cpp (the reader) which
lives in the same directory and is functionally related.  These tests
were missed because they don't call the writer directly.

Algorithm (new _query_sibling_dir_tests method):

1. Extract domain keywords from changed C++ source filenames using
   CamelCase word splitting, filtering out architectural/common words.
   E.g. CHColumnToArrowColumn.cpp → ["Arrow"]
       MergeTreeIndexConditionText.cpp → ["Index", "Text"]

2. With one keyword: LIKE '%Arrow%' (OR logic).
   With multiple: LIKE '%Index%' AND LIKE '%Text%' (AND logic avoids
   false matches on broad words like "Index" alone).

3. Inner query: find sibling files (same dir, keyword-filtered) that
   the PRIMARY tests already cover — these are files with a natural
   code relationship to the changed file.

4. Outer query: find tests covering those same sibling files that were
   NOT in the primary set — these tests exercise the same domain from
   a different entry point.

Results:
  PR #100150 (Arrow writer): 16 → 48 tests (+32 Arrow reader tests)
  PR #100224 (text index): 71 → 112 tests (+41 text/bloom index tests)
  No false positives added for unrelated PRs.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-bugfix Pull request with bugfix, not backported by default pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo v26.2-must-backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants