wangshuo128 commented on code in PR #12785:
URL: https://github.com/apache/doris/pull/12785#discussion_r978360611
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/batch/NereidsRewriteJobExecutor.java:
##########
@@ -70,7 +71,8 @@ public NereidsRewriteJobExecutor(CascadesContext
cascadesContext) {
.add(topDownBatch(ImmutableList.of(new EliminateLimit())))
.add(topDownBatch(ImmutableList.of(new EliminateFilter())))
.add(topDownBatch(ImmutableList.of(new
PruneOlapScanPartition())))
- .add(topDownBatch(ImmutableList.of(new SelectRollup())))
+ .add(topDownBatch(ImmutableList.of(new
SelectRollupWithAggregate())))
+ .add(topDownBatch(ImmutableList.of(new
SelectRollupWithoutAggregate())))
Review Comment:
The current implementation follows the legacy behavior: sort the candidate
select rollup indexes by row count from all the pruned partitions:
https://github.com/apache/doris/blob/bd12a49bafd68cc60b8615656184a9194539544c/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/mv/SelectRollup.java#L230-L232
I think we could move the logic based on statistics info to the exploration
phase in the future to use the CBO framework. Do you have any advice?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]