doris
doris copied to clipboard
[Feature](Nereids) Set pre-aggregation status for OLAP table scan.
Proposed changes
This is the second step for #12303.
Problem summary
The previous PR #12464 added the framework to select the rollup index for OLAP table, but pre-aggregation is turned on by default. This PR set pre-aggregation for scan OLAP table.
The main steps are as below:
- Select rollup index when aggregate is present, this is handled by
SelectRollupWithAggregate
rule. Expressions in aggregate functions, grouping expressions, and pushdown predicates would be used to check whether the pre-aggregation should be turned off. - When selecting from olap scan table without aggregate plan, it would be handled by
SelectRollupWithoutAggregate
.
Checklist(Required)
- Does it affect the original behavior:
- [ ] Yes
- [ ] No
- [ ] I don't know
- Has unit tests been added:
- [ ] Yes
- [ ] No
- [ ] No Need
- Has document been added or modified:
- [ ] Yes
- [ ] No
- [ ] No Need
- Does it need to update dependencies:
- [ ] Yes
- [ ] No
- Are there any changes that cannot be rolled back:
- [ ] Yes (If Yes, please explain WHY)
- [ ] No
Further comments
If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...