You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add test: IEJoin bail-out for a prepared Join-storage right side is untested - #113753
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 #109920.
That PR Adds the sort-based IEJoin algorithm (ie_join value of join_algorithm) for joins whose ON section has two inequality comparisons. New: JoinAlgorithm::IE_JOIN enum + setting value, IEJoinStep query plan step, IEJoinTransform/IEJoinAlgorithm merging transform, `QueryPipelineBuilder::join
1. IEJoin bail-out for a prepared Join-storage right side is untested src/Processors/QueryPlan/JoinStepLogical.cpp:918 Risk:buildPhysicalJoinImpl calls tryExtractIEJoinDescription as soon as isIEJoinPreferred holds (ie_join first + supported kind/strictness + two inequality conjuncts). The only thing that stops IEJoin from claiming a join against a prepared Join storage is JoinStepLogical.cpp:918-919 if (planning_context.is_storage_join) return {};, which the LLVM report marks uncovered. Risk: if this bail-out is broken or removed, a join against a Join-engine table (or any prepared join storage) … **What's unique vs PR tests:** The PR's routing negatives (04544_ie_join_detection_negatives.sql, 04556_ie_join_detection_strictness_negatives.sql, 04548_ie_join_algorithm_priority.sql) all reject IEJoin on the shape of the ONexpression or on the strictness. None of them exercises the planning-context bail-out: no test in the repository combinesie_joinwith anENGINE = Joinright side. If this PR is already merged, the cases can equivalently be appended to04544_ie_join_detection_negatives.sqlinstead of … **Tags:**-- Tags: no-old-analyzer—no-old-analyzer: IEJoin is planned only by the analyzer-based planner (JoinStepLogical`); the same tag is used by every IEJoin test the PR adds. Try it on ClickHouse Fiddle
Changelog category (leave one):
Not for changelog (changelog entry is not required)
a) Deterministic repro? ✅
Test exercises the previously-uncovered branch and passes (correct behaviour).
b) Root cause explained? ✅
src/Processors/QueryPlan/JoinStepLogical.cpp:918 -- if (planning_context.is_storage_join) return {}; inside tryExtractIEJoinDescription; no test in either test tree combines ie_join with an ENGINE = Join table.
c) Fix matches root cause? ✅
N/A for coverage gap — this PR adds a regression test, not a fix. Asserts current correct behaviour at the cited line.
d) Test intent preserved? / New tests added? ✅
New regression test added: 04561_ie_join_storage_join.sql.
e) Both directions demonstrated? ✅
Test passes (MATCH) on master proving current correctness; would fail if the cited branch regressed. Single-direction is the correct shape for a coverage gap test.
f) Fix is general, not a narrow patch? ✅
Test asserts the invariant at the cited line — covers the branch, not a specific input shape.
This test-only PR adds 04561_ie_join_storage_join to cover the planning_context.is_storage_join bail-out in tryExtractIEJoinDescription when ie_join is listed first but the right side is a prepared Join-engine table. The new EXPLAIN assertion and result checks line up with the current planner and storage-join behavior, and I did not find any correctness or test-quality issues in the current diff.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 #109920.
That PR Adds the sort-based IEJoin algorithm (
ie_joinvalue ofjoin_algorithm) for joins whoseONsection has two inequality comparisons. New:JoinAlgorithm::IE_JOINenum + setting value,IEJoinStepquery plan step,IEJoinTransform/IEJoinAlgorithmmerging transform, `QueryPipelineBuilder::join1. IEJoin bail-out for a prepared
Join-storage right side is untestedsrc/Processors/QueryPlan/JoinStepLogical.cpp:918Risk:
buildPhysicalJoinImplcallstryExtractIEJoinDescriptionas soon asisIEJoinPreferredholds (ie_joinfirst + supported kind/strictness + two inequality conjuncts). The only thing that stops IEJoin from claiming a join against a preparedJoinstorage isJoinStepLogical.cpp:918-919if (planning_context.is_storage_join) return {};, which the LLVM report marks uncovered. Risk: if this bail-out is broken or removed, a join against aJoin-engine table (or any prepared join storage) … **What's unique vs PR tests:** The PR's routing negatives (04544_ie_join_detection_negatives.sql,04556_ie_join_detection_strictness_negatives.sql,04548_ie_join_algorithm_priority.sql) all reject IEJoin on the shape of theONexpression or on the strictness. None of them exercises the planning-context bail-out: no test in the repository combinesie_joinwith anENGINE = Joinright side. If this PR is already merged, the cases can equivalently be appended to04544_ie_join_detection_negatives.sqlinstead of … **Tags:**-- Tags: no-old-analyzer—no-old-analyzer: IEJoin is planned only by the analyzer-based planner (JoinStepLogical`); the same tag is used by every IEJoin test the PR adds.Try it on ClickHouse Fiddle
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
Version info
26.8.1.953(included in26.8and later)