Repository navigation
Add test: Non-fitting String literal vs LowCardinality(FixedString) functional key: NULL-found bail-out (KeyCondition.cpp:2054) untested - #108815
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 [68cf8fe] Summary: ❌
|
LLVM Coverage Report
Changed lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 330 line(s), 11 function(s) across 120 file(s) · Details Top files
|
|
CI failure in |
|
@clickgapai fix the CI failures |
|
Can't retrigger CI — this finding no longer has an active PR to act on. If the underlying issue still matters, opening a fresh PR / issue would let me act. |
|
@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 #114305, the MergeTree/index group, though as two rows appended to the existing One correction to the original. The cited line is the function's opening line, not the bail-out. The appended rows assert that no partition condition is built for that literal and that the result is still correct. They sit next to four sibling rows asserting the opposite for fitting literals, so a plan-format change cannot satisfy the new absence assertion silently. |
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 #108777.
That PR The PR fixes
applyDeterministicDagToColumn(src/Storages/MergeTree/KeyCondition.cpp) so partition/key pruning is no longer silently disabled when aLowCardinality(FixedString)(orLowCardinality(Nullable(FixedString))) key column is wrapped in a function in the key (e.g. `PARTITION BY sipHas1. Non-fitting
Stringliteral vsLowCardinality(FixedString)functional key: NULL-found bail-out (KeyCondition.cpp:2054) untestedsrc/Storages/MergeTree/KeyCondition.cpp:2054Risk: Call chain: partition-pruning builds the key transform DAG for
sipHash64(k) % 8; to push theWHEREconstant into key spaceapplyDeterministicDagToColumncallscast_without_nulls(String '...', LowCardinality(FixedString(8)));canBeSafelyCastis false so it probes viaremoveLowCardinality(target)=FixedString(8); an over-length literal makescastColumnAccurateOrNullreturn NULL, the loop at 2052-2054 finds it and returns false. RISK: if this guard is removed/inverted, execution …What's unique vs PR tests: The PR's 04401 test only uses literals that FIT the FixedString length (8-char strings into
FixedString(8)), exercising the no-NULL path that ends incastColumnAccuratesucceeding. This test drives a literal that does NOT fit, taking the NULL-foundreturn falsebranch at line 2054 that 04401 never reaches.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