xiangfu0 commented on code in PR #14434:
URL: https://github.com/apache/pinot/pull/14434#discussion_r1841485598


##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/funnel/window/FunnelBaseAggregationFunction.java:
##########
@@ -58,12 +62,25 @@ public 
FunnelBaseAggregationFunction(List<ExpressionContext> arguments) {
     Preconditions.checkArgument(numArguments >= 3 + _numSteps,
         "FUNNEL_AGG_FUNC expects >= " + (3 + _numSteps) + " arguments, got: 
%s. The function can be used as "
             + getType().getName() + "(timestampExpression, windowSize, 
numberSteps, stepExpression, "
-            + "[stepExpression, ..], [mode, [mode, ... ]])",
+            + "[stepExpression, ..], [extraArgument/mode, [extraArgument/mode, 
... ]])",
         numArguments);
     _stepExpressions = arguments.subList(3, 3 + _numSteps);
-    if (numArguments > 3 + _numSteps) {
-      arguments.subList(3 + _numSteps, numArguments)
-          .forEach(arg -> 
_modes.add(Mode.valueOf(arg.getLiteral().getStringValue().toUpperCase())));
+    for (int i = 3 + _numSteps; i < numArguments; i++) {
+      String extraArgument = 
arguments.get(i).getLiteral().getStringValue().toUpperCase();
+      String[] parsedExtraArguments = extraArgument.split("=");
+      if (parsedExtraArguments.length == 2) {
+        String key = parsedExtraArguments[0];
+        if (key.equalsIgnoreCase("MaxStepDuration")) {

Review Comment:
   mode is enum, so it's hard to make the `mode=<mode>` argument. 
   Will keep the configs assignments and mode enums 



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

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


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

Reply via email to