oceanbase / oceanbase/oceanbase
[Enhancement]: push down group by to union
Open
@AA-tuliwei-BB is already working on this.
Since Jun 27, 2024.
type: enhancement
- Dominant language
- C++
- Stars
- 10.3k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
Enhancement
添加改写规则:将group by下推到union all的子查询中进行预聚合,以达到(可能能够)使用存储层元数据加速查询的效果。
举例
select sum(c1), c2
from
(
select * from t1
union all
select * from t2
) v group by c2;
=>
select sum(c1), c2
from
(
select sum(c1) as c1, c2 from t1
union all
select sum(c1) as c1, c2 from t2
) v group by c2;
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.