You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "kishoreg (via GitHub)" <gi...@apache.org> on 2023/06/06 06:02:50 UTC

[GitHub] [pinot] kishoreg commented on a diff in pull request #10846: [multistage] Initial planner changes to support the v1 aggregation functions in multistage

kishoreg commented on code in PR #10846:
URL: https://github.com/apache/pinot/pull/10846#discussion_r1218955611


##########
pinot-query-planner/src/main/java/org/apache/calcite/sql/fun/PinotOperatorTable.java:
##########
@@ -103,6 +98,61 @@ public final void initNoDuplicate() {
         throw Util.throwAsRuntime(Util.causeOrSelf(e));
       }
     }
+
+    // Walk through all the Pinot aggregation types and register those that are supported in multistage and which
+    // aren't standard Calcite functions such as SUM / MIN / MAX / COUNT etc.
+    for (AggregationFunctionType aggregationFunctionType : AggregationFunctionType.values()) {
+      if (aggregationFunctionType.isNativeCalciteAggregationFunctionType()
+          || !aggregationFunctionType.isSupportedInMultiStage()) {

Review Comment:
   its probably better to just have a hard coded list in this class



##########
pinot-query-planner/src/main/java/org/apache/calcite/sql/fun/PinotOperatorTable.java:
##########
@@ -103,6 +98,61 @@ public final void initNoDuplicate() {
         throw Util.throwAsRuntime(Util.causeOrSelf(e));
       }
     }
+
+    // Walk through all the Pinot aggregation types and register those that are supported in multistage and which
+    // aren't standard Calcite functions such as SUM / MIN / MAX / COUNT etc.
+    for (AggregationFunctionType aggregationFunctionType : AggregationFunctionType.values()) {
+      if (aggregationFunctionType.isNativeCalciteAggregationFunctionType()
+          || !aggregationFunctionType.isSupportedInMultiStage()) {

Review Comment:
   is it possible to have better method name to derive this? adding this to the Type interface will result in backward incompatibility later when we make v2 the default



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