Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

anti semi join with other condition may get wrong results #8791

Closed
windtalker opened this issue Feb 27, 2024 · 2 comments
Closed

anti semi join with other condition may get wrong results #8791

windtalker opened this issue Feb 27, 2024 · 2 comments
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.

Comments

@windtalker
Copy link
Contributor

windtalker commented Feb 27, 2024

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 call handleOtherConditions to further evaluate the other condition. In handleOtherConditions, the input argument anti_filter and offsets_to_replicate is expected to be a vector of size probe_process_info.end_row - probe_process_info.start_row, however, for anti-semi join, the caller only cut offsets_to_replicate to the correct size(https://github.com/pingcap/tiflash/blob/v7.5.0/dbms/src/Interpreters/Join.cpp#L1297-L1307), for filter, it is not handled, which will make handleOtherConditions 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)

@windtalker
Copy link
Contributor Author

closed by #8792

@seiya-annie
Copy link

/found customer

@ti-chi-bot ti-chi-bot bot added the report/customer Customers have encountered this bug. label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

3 participants