julianhyde commented on code in PR #5336:
URL: https://github.com/apache/calcite/pull/5336#discussion_r4296856729


##########
core/src/main/java/org/apache/calcite/rel/rules/AggregateReduceFunctionsOnGroupKeysRule.java:
##########
@@ -147,6 +147,11 @@ protected AggregateReduceFunctionsOnGroupKeysRule(Config 
config) {
     if (!Aggregate.isSimple(aggregate)) {
       return null;
     }
+    // A global aggregate may return NULL on empty input even when its

Review Comment:
   Aggregate functions don't always return NULL on empty input. For example 
COUNT returns 0.
   
   Is there an interface on SqlFunction that reports the value an aggregate 
function returns on empty input?



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

Reply via email to