Repository navigation
Fix incorrect JOIN results caused by silently dropped WHERE filters - #101652
Conversation
|
Workflow [PR], commit [805ba1d] Summary: ✅ AI ReviewSummaryThis PR fixes a real correctness bug in ClickHouse Rules
Final VerdictStatus: ✅ Approve |
…e-mismatched equalities
9ae82a6 to
b903e55
Compare
|
The Stress test (arm_msan) failure is fixed by #101239, which should be merged first. After it is merged, please update the branch to include the fix. |
|
The test |
|
The MSan stress test failure (MemorySanitizer: use-of-uninitialized-value, STID 4179-5154 or 4148-3044) is a known pre-existing issue unrelated to this PR. Fix: #102158 |
|
The flaky failure of |
|
Hi @novikd, this is an easy-to-review fix. Feel free to take a look when you have time. |
LLVM Coverage Report
Changed lines: 100.00% (4/4) · Uncovered code |
|
Magnificent! Thank you for the fix! |
|
Hi — this PR may need backporting to Affected code: Why: The buggy file If this should be backported, consider adding |
Fixed #102002
When
extractActionsForJoinConditionencountered anequalsconjunct with mismatched argument types (e.g.UInt32vsUInt64), it wouldcontinuewithout adding the conjunct torejected_conjuncts. If another conjunct in the same WHERE clause was successfully extracted into the JOIN condition, the type-mismatched one was silently lost and theFilterStepcould be replaced by anExpressionStep, producing incorrect query results.Reproducer: https://fiddle.clickhouse.com/3306ebe1-2dc7-402b-84da-145ed91e0c7e
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix incorrect JOIN query results when
mergeFilterIntoJoinConditionoptimization silently dropped a WHERE equality condition with mismatched types.Documentation entry for user-facing changes
Version info
26.5.1.239