oceanbase / oceanbase/oceanbase

[Enhancement]: push down group by to union

Open
#2,030 1 comment 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.