yashmayya commented on code in PR #17109:
URL: https://github.com/apache/pinot/pull/17109#discussion_r2557960512


##########
pinot-query-planner/src/main/java/org/apache/pinot/calcite/sql/fun/PinotOperatorTable.java:
##########
@@ -467,4 +474,26 @@ public boolean allowsFraming() {
       return false;
     }
   }
+
+  /// Pinot's custom SUM aggregation function that can aggregate on SV or MV 
numeric inputs.
+  private static final class PinotSumFunction extends PinotSqlAggFunction {

Review Comment:
   We should probably do this for `MIN` / `MAX` as well actually - 
https://github.com/apache/calcite/blob/14d62816ff69319b02c45aa6d964f11918617bf3/core/src/main/java/org/apache/calcite/sql/fun/SqlMinMaxAggFunction.java#L148-L153.
   
   This is used by 
[AggregateRemoveRule](https://github.com/apache/calcite/blob/14d62816ff69319b02c45aa6d964f11918617bf3/core/src/main/java/org/apache/calcite/rel/rules/AggregateRemoveRule.java#L54),
 and was caught for `SUM` by one of our planner unit tests. 



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