gortiz commented on code in PR #13711: URL: https://github.com/apache/pinot/pull/13711#discussion_r1696957306
########## pinot-core/src/main/java/org/apache/pinot/core/query/postaggregation/PostAggregationFunction.java: ########## @@ -38,20 +37,20 @@ public class PostAggregationFunction { public PostAggregationFunction(String functionName, ColumnDataType[] argumentTypes) { String canonicalName = FunctionRegistry.canonicalize(functionName); - FunctionInfo functionInfo = FunctionRegistry.lookupFunctionInfo(canonicalName, argumentTypes); + int numArguments = argumentTypes.length; + FunctionInfo functionInfo = FunctionRegistry.lookupFunctionInfo(canonicalName, numArguments); if (functionInfo == null) { if (FunctionRegistry.contains(canonicalName)) { throw new IllegalArgumentException( - String.format("Unsupported function: %s with argument types: %s", functionName, - Arrays.toString(argumentTypes))); + String.format("Unsupported function: %s with %d parameters", functionName, numArguments)); Review Comment: I would recommend to do not use `String.format` if not needed. In this case it is easier (and cheaper!) to just concatenate text. It is different if `Preconditions` is used, given there we would need to first call toString on arguments,t hen concatenate... just to verify then verify that the String will not be used. -- 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