[improve](nereids) support agg function of count(const value) pushdown #26677
support sql: select count(1)-count(not null) from table, the agg of count could push down.
This commit is contained in:
@ -57,7 +57,7 @@ public class CountLiteralToCountStar extends OneRewriteRuleFactory {
|
||||
.filter(this::isCountLiteral)
|
||||
.forEach(c -> replaced.put(c, new Count()));
|
||||
expr = expr.rewriteUp(s -> replaced.getOrDefault(s, s));
|
||||
changed = !replaced.isEmpty();
|
||||
changed |= !replaced.isEmpty();
|
||||
newExprs.add((NamedExpression) expr);
|
||||
}
|
||||
return changed;
|
||||
|
||||
Reference in New Issue
Block a user