You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "siddharthteotia (via GitHub)" <gi...@apache.org> on 2023/05/08 01:34:58 UTC

[GitHub] [pinot] siddharthteotia commented on a diff in pull request #10636: Support for ARG_MIN and ARG_MAX Functions

siddharthteotia commented on code in PR #10636:
URL: https://github.com/apache/pinot/pull/10636#discussion_r1186956865


##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/AggregationFunctionType.java:
##########
@@ -94,7 +95,15 @@ public enum AggregationFunctionType {
 
   // boolean aggregate functions
   BOOLAND("boolAnd"),
-  BOOLOR("boolOr");
+  BOOLOR("boolOr"),
+
+  // argMin and argMax
+  ARGMIN("argMin"),
+  ARGMAX("argMax"),
+  PINOTPARENTAGGREGATIONARGMIN(CommonConstants.RewriterConstants.PARENT_AGGREGATION_NAME_PREFIX + ARGMIN.getName()),
+  PINOTPARENTAGGREGATIONARGMAX(CommonConstants.RewriterConstants.PARENT_AGGREGATION_NAME_PREFIX + ARGMAX.getName()),
+  PINOTCHILDAGGREGATIONARGMIN(CommonConstants.RewriterConstants.CHILD_AGGREGATION_NAME_PREFIX + ARGMIN.getName()),
+  PINOTCHILDAGGREGATIONARGMAX(CommonConstants.RewriterConstants.CHILD_AGGREGATION_NAME_PREFIX + ARGMAX.getName());

Review Comment:
   Can 103-106 be encapsulated within the rewriter itself as opposed to exposing them in AggregationFunctionType.java ? 
   
   I feel we should only have user exposed aggregation functions which can be used in SQL in this file ?



-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org