anti semi join with other condition may get wrong results #8791
Labels
affects-6.6
affects-7.0
affects-7.1
This bug affects the 7.1.x(LTS) versions.
affects-7.2
affects-7.3
affects-7.4
affects-7.5
This bug affects the 7.5.x(LTS) versions.
component/compute
report/customer
Customers have encountered this bug.
severity/critical
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
During the join probe stage, in order to make sure that Intermediate block's size is not bigger than
max_block_size
, one probe block maybe probed multiple times, each time only [probe_process_info.start_row, probe_process_info.end_row) rows is processed. If the join has other condition, after probe the hash table, it need to callhandleOtherConditions
to further evaluate the other condition. In handleOtherConditions, the input argumentanti_filter
andoffsets_to_replicate
is expected to be a vector of sizeprobe_process_info.end_row - probe_process_info.start_row
, however, for anti-semi join, the caller only cutoffsets_to_replicate
to the correct size(https://github.com/pingcap/tiflash/blob/v7.5.0/dbms/src/Interpreters/Join.cpp#L1297-L1307), forfilter
, it is not handled, which will makehandleOtherConditions
return wrong result in some cases.This bug only affect v6.6 ~v7.5
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiFlash version? (Required)
The text was updated successfully, but these errors were encountered: