-
Notifications
You must be signed in to change notification settings - Fork 409
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
tidb reports error if there is a leftsemijoin on the top but refers no columns on probe side on which runs a mpp join #1718
Comments
Here I reproduce this case in a smaller stmt:
|
Note that for hash join 20, it doesn't refer any columns on the left side. Then the column prunner cut all the columns of its left child, which orignally is a projection. After Logical Optimize, the left child of Hash join 20 is project 21 with no columns and the child of project 21 is Hash Join 22 with an empty schema. Like this:
But note that hash join 22 actually needs two columns as equal condition, so the children of hash join 22 has non-empty schema. |
But Join doesn't pass it's schema to TiFlash, so TiFlash must assume that the join's schema is strictly equal to the combined schema of its children. The remake of Schema is here: https://github.com/pingcap/tidb/blob/master/planner/core/task.go#L734 Now we have Hash Join 22 with non-empty schema and Project 21 with empty schema. |
Then, resolve the index of hash join 20's other condition, we get index 0. But in the optimization in |
fixed by pingcap/tidb#24024 |
mysql -h 172.16.5.85 -P53324 -uroot -D agg_sub_datat10000
The text was updated successfully, but these errors were encountered: