[MDEV-13587] CONNECT BY: Post-parse data structures Created: 2017-08-19 Updated: 2018-12-03 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | Compatibility | ||
| Issue Links: |
|
||||||||
| Description |
ConsiderationsWhat kind of data structures should be created for a select with CONNECT BY? The parser creates data structures that closely match the SQL syntax. We will need to: Step 1. Perform the optimization and execute the anchor part of the query
Step 2. Perform the optimization and execute the recursive part of the query
Step 3. Read the recursion output
Suggested data structureConvert a CONNECT BY into a data structure similar to a recursive CTE. It will still use a UNION-like data structure. Recursive CTE is a special kind of UNION (or UNION ALL). It is represented by a
Both are SELECTs and are represented by SELECT_LEX structures. For CONNECT BY query, the data structures should be similar:
What to do
|
| Comments |
| Comment by Igor Babaev [ 2017-08-31 ] |
|
Whoever implements this task should build an object of the class With_clause |