yujun777 commented on code in PR #60534:
URL: https://github.com/apache/doris/pull/60534#discussion_r2785557049


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/InferAggNotNull.java:
##########
@@ -54,7 +55,8 @@ public Rule build() {
                             || funcs.stream().allMatch(f -> f instanceof Avg)
                             || funcs.stream().allMatch(f -> f instanceof Sum)
                             || funcs.stream().allMatch(f -> f instanceof Max)
-                            || funcs.stream().allMatch(f -> f instanceof Min);
+                            || funcs.stream().allMatch(f -> f instanceof Min)
+                            || funcs.stream().allMatch(f -> f instanceof Ndv);

Review Comment:
   calling stream api is inefficient,  and here calling stream api multiple 
times. Maybe refactor to funcs.stream.allMatch(f -> f instanceof XX  or f 
instanceof XX or ...) is better



-- 
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]

Reply via email to