-
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
incorrect result caused by stream agg #49605
Comments
So the 110 rows should be the correct result.
I think the IndexMerge can't keep the col_85 order, but we don't generate an extra sort to keep col_85 order.
|
You are right. Maybe I have some mistake database when I test the no collation table. |
I try the another plan with only index reader which will add the sort node under the stream agg when the sort of child plan is not satisfy the requirement.
So, the optimizer should add the sort node under the stream agg if the sort property of child plan is not satisfy the requirement. Optimizer lost the sort property in somewhere when the under plan contains the index merge. |
@AilinKid Please take a look |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
Two queries get the same results.
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
v7.6.0-alpha-342-g5883c5ba34-dirty
The text was updated successfully, but these errors were encountered: