-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
Derived Table access to Outer Query Scope #4534
Comments
This appears to be a newly removed restriction in MySQL, starting in 8.0.14. From the MySQL Derived Table reference docs:
Dolt currently matches the pre-8.0.14 behavior, where derived tables do not have visibility to any tables or expressions from outer scopes. Passing the scope information through should be fairly straightforward, but we'll also need to do some testing to make sure we understand the exact visibility rules so we can match MySQL's behavior, and then see if any changes are needed to execute the query. |
There is a nice MySQL blog post announcing and explaining this feature. It is similar to |
Quick update on progress... I landed some alias changes yesterday that were also needed by this feature to help track subquery scopes better. I've got the visibility portion for this feature working, but I'm still debugging through some queries that aren't returning the same results as MySQL. I'll keep working on this one and expect to have this working by the end of this week. |
I've got support for this new feature coded up in the linked pull request (dolthub/go-mysql-server#1310) and ready for feedback from teammates. I'll update again as we progress towards releasing this. |
Sorry for the slow response on this one. Progress was steady, but slow, over the past week while I worked through adding caching back in for subquery aliases (previously we could always cache any subquery alias, but it now requires more analysis to tell if caching is safe). It also took some time to test against our large, deeply nested integration query plans. I've worked through the issues and have all GMS and Dolt tests passing. I'll get Max and Zach to take a look at the latest code today and Monday and see if they have any feedback before we merge it in and will post another update here. |
Just closing the loop on this one... the support for derived tables with outer scope visibility landed in go-mysql-server yesterday and is prepped to go out in a Dolt release later today. |
error: 'table not found: dcim_rackgroup, maybe you mean dcim_rackgroup?' for query:
schema:
The text was updated successfully, but these errors were encountered: