Jackie-Jiang commented on a change in pull request #5795:
URL: https://github.com/apache/incubator-pinot/pull/5795#discussion_r465385004
##########
File path:
pinot-common/src/main/java/org/apache/pinot/common/function/AggregationFunctionType.java
##########
@@ -101,6 +101,13 @@ public static AggregationFunctionType
getAggregationFunctionType(String function
try {
return AggregationFunctionType.valueOf(upperCaseFunctionName);
} catch (Exception e) {
+ if (upperCaseFunctionName.contains("_")) {
Review comment:
This won't cover functions such as `percentile_tdigest`.
We can make the current one a private helper method, and add a new
`getAggregationFunctionType` to look up for both functionName with/without
underscore
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/AggregationFunctionFactory.java
##########
@@ -106,7 +106,7 @@ public static AggregationFunction
getAggregationFunction(FunctionContext functio
}
throw new IllegalArgumentException("Invalid percentile function: " +
function);
} else {
- switch (AggregationFunctionType.valueOf(upperCaseFunctionName)) {
+ switch
(AggregationFunctionType.getAggregationFunctionType(upperCaseFunctionName)) {
Review comment:
Same here
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]