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
v3: how to draw an owl #1492
v3: how to draw an owl #1492
Commits on Jan 29, 2016
-
v3: From->Select for RouteBuilder
We now need a place to push where clauses and other constructs. We'll need all constructs of a Select statement since that's what we're eventually building.
-
sqlparser: Walk functionality for ast
This will be used for the v3 planbuilder.
Commits on Jan 30, 2016
-
v3: find rightmost route for WHERE clause
Skeletal code to identify the rightmost route where we can push individual parts of a where clause. We also add flags for RouteBuilder and TableAlias if they're on the RHS of a left join.
Commits on Jan 31, 2016
-
v3: filter push-down and routing changes
WHERE clause filters can now be pushed down, and we also perform routing changes if applicable.
-
v3: Add name and String functions to vindexes
There are no colvindexes in the new v3 routes. So, we need a better way to test that the correct vindexes were chosen.
-
v3: WHERE clause handling is done
Still need to write more tests. Subqueries won't be addressed till the end.
-
v3: Left and Right Orders for JoinBuilders
We need to know the Order of left and right nodes for the join builders. This allow us to know the correct path from the root node to the necessary RouteBuilder.
-
This part just reuses the filter functions with some slightly modified rules.
Commits on Feb 1, 2016
Commits on Feb 2, 2016
Commits on Feb 3, 2016
-
Changed the symbol table to have slices because map is overkill for a handful of symbols. Changed select to use rightmost route, just like where clause.
Commits on Feb 4, 2016
-
v3: add metadata to sqlparser.ColName
When symbols get resolved, those decisions need to be persisted. Otherwise, the symbol table evolves and introduces new symbols that may hide old ones (when SELECT is parsed). A re-resolution after the fact can produce inconsistent/incorrect results. In other words, we need the original resolution to be remembered when we decide to wire things up at the end.
-
v3: stricter reference checking
The symtab Find will now return an error if a reference could not be resolved. It's also now broken out into another function, Vindex, which returns a Vindex of one can be found for the expression.
Commits on Feb 5, 2016
-
-
-
-
v3: refactor for better clarity
Merging FindInScope and Find, because it wasn't clear when to use what. Now, Find returns an isLocal flag. This forces you to think if that needs to be checked in the current context.
Commits on Feb 6, 2016
Commits on Feb 7, 2016
-
-
The previous scheme was hard to implement at execution time. In the new scheme, every join node knows contains info about which vars it needs to supply.
Commits on Feb 8, 2016
-
v3: end-to-end is now working, tests passing
A few features are still to be done, like subquery in FROM clause, but everything is functional end-to-end, and the old v3 tests are passing against the new code. Comprehensive tests need to be written, and the code needs commenting and cleanup.
-
-
-
Commits on Feb 9, 2016
Commits on Feb 10, 2016
Commits on Feb 11, 2016
Commits on Feb 12, 2016
-
They're not as different as I thought they were.
-
-
Commits on Feb 13, 2016
-
-
-
v3: remove obsolete FirstRoute from symtab
We now use the more versatile leftmost(plan) construct.
-
-
v3: planBuilder points to symtab
This containment simplifies paramter-passing across the board.
Commits on Feb 15, 2016
-
v3: fix nested subquery merge issue
For more than one level of subquery nesting. The route symbol table was getting repointed only at the first level. In order to address this, I'm using a new redirect scheme where a route can redirect to another route. In the new scheme we just redirect the current route to the new one. So, if there are other routes that are redirected to the current one, they will also get redirected to the new route.
-
v3: subquery support in FROM clause
We still don't support joins there, but routes will work.
-
v3: use impossible queries to get field info
If the LHS of a join returns no rows, we still need to get the field info from the RHS. For this, we need to send a query with an impossible where clause, which is a low cost way of fetching field info from mysql.
-
Two routes can be merged if they target the same shard
Commits on Feb 16, 2016
-
Field info was being built for every call to join. It was wasteful for the case of nested loops.
Commits on Feb 17, 2016
Commits on Feb 19, 2016
Commits on Feb 20, 2016
Commits on Feb 21, 2016
-
Push functions have been moved as members of the primitives. This structure will be more convenient if we add more primitives in the future.
-
-
Commits on Feb 22, 2016
-
-
-
-
v3: reorder subqueries in filters
If subqueries are processed last, then we generally get better plans because other conditions could improve the outer query's plan first.
Commits on Feb 23, 2016
Commits on Feb 24, 2016
Commits on Feb 25, 2016
Commits on Feb 26, 2016
Commits on Feb 27, 2016
Commits on Feb 29, 2016
Commits on Mar 1, 2016
Commits on Mar 2, 2016
Commits on Mar 3, 2016
-
-
v3: select * support on popular demand
Allowing '*' expressions for simple routes. This is for supporting legacy apps that may still be using this construct.
Commits on Mar 4, 2016
Commits on Mar 5, 2016
-
Adding NEXTVAL as keyword. This lets us control where this can or cannot be allowed at the parser level. Also, the argument to NEXTVAL is a table name, which is technically a different syntax than a normal function.