-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
planner: the optimizer returns 'cannot find column' error when aggregating view with json columns #50926
Comments
/type regression |
@qw4990 said that 6.5 also met this problem in the customer's env. So the labels are starting from 6.5 |
Regression Analysis |
Regression Analysis |
Regression Analysis |
Regression Analysis |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
No error
3. What did you see instead (Required)
ERROR 1105 (HY000): Can't find column Column#4 in schema Column: [test.t._tidb_rowid] Unique key: []
4. What is your TiDB version? (Required)
5. Analysis
When pushing Agg down through Projection, the optimizer needs to replace all columns produced by the Projection to its original expression, but it forgets to check whether this replacement succeeded or failed.
In this case, the replacement fails due to some collation check on JSON expressions, but the optimizer still pushes the Agg, then meet this error:
The text was updated successfully, but these errors were encountered: