morrySnow commented on code in PR #29242: URL: https://github.com/apache/doris/pull/29242#discussion_r1439188669
########## fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/AggregateStrategies.java: ########## @@ -140,6 +143,70 @@ public List<Rule> buildRules() { return pushdownCountOnIndex(agg, project, filter, olapScan, ctx.cascadesContext); }) ), + RuleType.STORAGE_LAYER_AGGREGATE_MINMAX_ON_UNIQUE_WITHOUT_PROJECT.build( + logicalAggregate( + logicalFilter( + logicalOlapScan().when(this::isUniqueKeyTable)) + .when(filter -> { + if (filter.getConjuncts().size() != 1) { + return false; + } + Expression childExpr = filter.getConjuncts().iterator().next().children().get(0); + if (childExpr instanceof SlotReference) { + return ((SlotReference) childExpr).getColumn().get().isDeleteSignColumn(); Review Comment: this could be npe. u chould check getColumn().isPresent() -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org