Document & refactor logical optimizer
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
Recently we've hit few bugs (#2021, #2034, #2017) in the optimizer/master planner. The motivation for opening this issue that we suspect there might be more hidden bugs like the ones we've found.
The goal is to:
1. Simplify the related code
- Better variable names, smaller functions, more comments
2. Document what is being pushed down and what is pulled to the coordinator when the query involves
- Aggregates, DISTINCT, DISTINCT ON, HAVING, COUNT DISTINCT, LIMIT - OFFSET - ORDER BY, Window functions, Group by on distribution key / or not, subqueries (mostly pushdownable ones)
3. Improve the optimizer
- Some more refactoring based on the previous items
- Apply missing optimizations if any
- Fix any issues found
Contributor guide
Assessment
This issue has not been assessed yet.