Jackie-Jiang commented on a change in pull request #5795: URL: https://github.com/apache/incubator-pinot/pull/5795#discussion_r466082450
########## File path: pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/AggregationFunctionFactory.java ########## @@ -45,10 +45,12 @@ private AggregationFunctionFactory() { public static AggregationFunction getAggregationFunction(FunctionContext function, QueryContext queryContext) { try { String upperCaseFunctionName = function.getFunctionName().toUpperCase(); + AggregationFunctionType aggregationFunctionType = + AggregationFunctionType.getAggregationFunctionType(upperCaseFunctionName); List<ExpressionContext> arguments = function.getArguments(); ExpressionContext firstArgument = arguments.get(0); - if (upperCaseFunctionName.startsWith("PERCENTILE")) { - String remainingFunctionName = upperCaseFunctionName.substring(10); + if (aggregationFunctionType.getName().toUpperCase().startsWith("PERCENTILE")) { Review comment: `.name()` will return upper case though :-P ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org