-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
overflow during plan cost calculation leads to wrong join reorder #56704
Comments
/severity moderate |
@apollodafoni: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
|
|
right join
may return error result when using hash_join
right join
may return error result when using HashJoin
@apollodafoni Can you change the table data into |
@winoros I can reproduce this bug. I think there is 2 unexpected thing:
|
right join
may return error result when using HashJoin
|
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
The following datasets can be used:
first step:
second step:
2. What did you expect to see? (Required)
The second step should return 49 rows!
3. What did you see instead (Required)
First step return 49 rows which is correct, and its execution plan is
merge_join
.After analyze table, second step return 2401 rows which is wrong, and its execution plan is
hash_join
.Some returned result fragments:
4. What is your TiDB version? (Required)
Release Version: v8.4.0
Edition: Community
Git Commit Hash: 1832b27
Git Branch: HEAD
UTC Build Time: 2024-10-15 03:47:37
GoVersion: go1.23.2
Race Enabled: false
Check Table Before Drop: false
Store: tikv
The text was updated successfully, but these errors were encountered: