Repository navigation
Add test: vectorFixedConstant matches-everything shortcut (FixedString column LIKE constant %-run) untested - #107447
clickgapai wants to merge 2 commits into
Conversation
|
Pre-PR Validation Gate (per ClickGap pipeline): a) Deterministic repro? ✅ b) Root cause explained? ✅ c) Fix matches root cause? ✅ d) Test intent preserved? / New tests added? ✅ e) Both directions demonstrated? ✅ f) Fix is general, not a narrow patch? ✅ |
|
Workflow [PR], commit [464bb53] Summary: ❌
|
LLVM Coverage Report
Changed lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 316 line(s), 34 function(s) across 132 file(s) · Details Top files
|
|
ClickGap AI Bot seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
@groeneai can you take this up and open a new PR? |
|
Taking this up. Triaged against master Verified: It will be re-filed as part of an area-grouped PR rather than its own PR, to keep reviewer load down (26 in this batch plus 18 from the earlier one today). Full triage and the grouping plan: #101781 (comment) |
|
Re-filed as #114260, grouped with the other five functions/types tests from this batch rather than as its own PR, to keep reviewer load down. Adopted with two changes. The |
Re-files six test-only coverage PRs that were closed without merging, at the request of their author. Each test was verified to be non-vacuous by mutating the exact line it claims to cover and requiring the test to fail; the arms and their controls are listed below. - 04201_dot_product_const_nonconst_size_mismatch: the size check in arrayDotProduct's one-constant-argument path. The existing 02708_dotProduct covers only equal sizes there, and the two-non-constant path throws from a different site with a different message. - 04201_array_index_of_count_equal_nullable_value: the null_map row skip shared by has/indexOf/countEqual. Only has() reached it before. Trimmed to Nullable(UInt64): with Nullable(String) the nested default never equals an array element, so that variant cannot detect the regression. - 04201_json_extract_keys_and_values_low_cardinality_input: LowCardinality stripping for the two functions that force their return type. Only JSONExtract exercised it with a non-constant LowCardinality column. - 04329_like_fixedstring_constant_match_everything: the matches-everything shortcut for a FixedString haystack. Existing FixedString LIKE tests all use substantive patterns. Keeps one row per template instantiation (LIKE / NOT LIKE / ILIKE / match). - 04146_ipv6_hashing_distinct_values: per-row indexing when hashing an IPv6 column. 02998_ipv6_hashing repeats a single value, so it cannot detect a regression that always reads row 0. - 04201_windowID_hop_time_overflow: the hop-window overflow guard, which is duplicated in the windowID and hop code paths. Neither copy was tested; mutating one reddens only its own row, so both are now pinned. Every argument carries an explicit timezone because an unqualified DateTime literal is read in the session timezone, which CI randomizes across the overflow boundary. Related: ClickHouse#103918 Related: ClickHouse#103922 Related: ClickHouse#103940 Related: ClickHouse#107447 Related: ClickHouse#103885 Related: ClickHouse#103931
Found via ClickGap automated review. Please close or comment if this is incorrect or needs adjustment.
This is a test-only PR — no source code changes. Please review: test quality, whether the claimed coverage gaps are real, and whether test output makes sense.
Adds test coverage for 1 untested code path(s), found during automated review of PR #100479.
That PR (1) PR implements
MatchImpl::constantVector(previously a stub that threwILLEGAL_COLUMN) solike/ilike/notLike/notILike/matchaccept a constant haystack with a non-constant needle (e.g.'foo' LIKE pattern_column). It also extracts a sharedmatchOneRowhelper used byvectorVector1.
vectorFixedConstantmatches-everything shortcut (FixedString column LIKE constant%-run) untestedsrc/Functions/MatchImpl.h:306Risk: Dispatch
FunctionsStringSearch.h:345-346routescol_haystack_vector_fixed && col_needle_consttovectorFixedConstant, whose shortcut atMatchImpl.h:304-308sets every result to!negate. The PR changed the condition at line 304 fromneedle == "%" || needle == "%%"toimpl::likePatternMatchesEverything(needle), and LLVM confirms lines 306-307 executed by no test. Risk: if this shortcut is broken (e.g.!negateflipped, orlikePatternMatchesEverythingregresses), …What's unique vs PR tests: The PR's 04327 test exercises the new
constantVector(const haystack + needle column) andvectorFixedVector(FixedString haystack + needle COLUMN). This test exercisesvectorFixedConstant(FixedString haystack + CONSTANT %-run needle), the only matches-everything branch the PR modified that LLVM marks uncovered.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not applicable — test-only change.
Documentation entry for user-facing changes