-
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
planner/core: the order by with default field not parsed (#11210) #11668
Conversation
Hi contributor, thanks for your PR. This patch needs to be approved by someone of admins. They should reply with "/ok-to-test" to accept this PR for running test automatically. |
Need more time to fix UTs |
@gaoxingliang friendly ping, any update? |
the progress is not good. I think I missed something when I try to parse the ColumnName so many cases need to be considered (similar with the ColumnNameExpr, but I don't understand the difference). I think I need to close this PR temp now and do more checks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we check if the column has default value definition in expression rewriting of buildSort
and report error (if no definition) or replace the ByItem to a constant?
@gaoxingliang friendly ping, any update? |
Hi @eurekaka , it will not working. I test and found the schema information is not correct when we calling the plan.schema in buildSort and try to remapped in the |
@gaoxingliang Sorry I didn't get your point. IMHO, theoretically, we can make the transformation when resolving the ORDER BY clause. |
Hi @eurekaka below is more details about this issue. for your suggestion, the [transformer] (https://github.com/pingcap/tidb/blob/release-3.0/planner/core/logical_plan_builder.go#L2132) happened after the error occur. so I don't think that will fix this problem. |
Hi @gaoxingliang, friendly ping, any update? |
@gaoxingliang, please update your pull request. |
1 similar comment
@gaoxingliang, please update your pull request. |
@gaoxingliang PR closed due to no update for a long time. Feel free to reopen it anytime. |
What problem does this PR solve?
Fix #11210
when order by with
default(colName)
is not resolved and got unknown columnWhat is changed and how it works?
parse the column name expr in the order by resolver.
Check List
Tests