SQL Improvements [Parent Issue]
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
It is useful to have an issue to track the missing pieces in SQL support. As we find new improvement areas, we can add here or link issues to this issue. We're pretty sure that there are some issues that are not listed here, the issue will grow over time.
### Recursive planning Roadmap
- [ ] Push filters to subqueries #3119
- [ ] Do not pull unnecessary columns #3118
- [x] More generic local tables (allow joins with local tables)
- [x] Subqueries/CTEs in the outer part of outer joins: Prototype #2504 /
#2614
- [x] Subqueries in target list #2010
### Logical planner roadmap (unsupported multi-shard queries that are not subqueries)
- [ ] Grouping sets #2219
- [x] Table sample
- [ ] FOR UPDATE #4647
- [ ] Recursive CTEs
### Data Warehouse roadmap
- [ ] Correlated subqueries on non-distribution key #1862
- [ ] Repartition outer joins for tables and subqueries #1862
- [x] Intermediate results in task-tracker #3390
- [ ] Make repartitioning faster
### Recursive planning executor roadmap
- [ ] Partitioned “broadcast”
### Query pushdown roadmap (Optimizations)
- [ ] Equivalence performance: Query pushdown relies on restriction equivalence provided by Postgres. Our current algorithm that decides the equivalence among the relations has O(n^3) complexity. Details are on #1322.
- [ ] Top-level set operation pushdown #1913
- [x] Push down count distinct on partition column for subqueries #1877
For non-subqueries, count(DISTINCT distribution_column) is pushed down to the workers. This is a powerful optimization that allows us to get rid of the duplicates on the worker nodes and parallelize the work. Unfortunately, this is not implemented for subqueries. For the details see #1877.
### Router Planner RoadMap
- [ ] Modifying CTEs (INSERT) should not do recursive planning
Contributor guide
Assessment
This issue has not been assessed yet.