saurabhd336 commented on code in PR #8582: URL: https://github.com/apache/pinot/pull/8582#discussion_r864454190
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/function/InbuiltFunctionEvaluator.java: ########## @@ -68,17 +69,27 @@ private ExecutableNode planExecution(ExpressionContext expression) { childNodes[i] = planExecution(arguments.get(i)); } String functionName = function.getFunctionName(); - FunctionInfo functionInfo = FunctionRegistry.getFunctionInfo(functionName, numArguments); - if (functionInfo == null) { - if (FunctionRegistry.containsFunction(functionName)) { - throw new IllegalStateException( - String.format("Unsupported function: %s with %d parameters", functionName, numArguments)); - } else { - throw new IllegalStateException( - String.format("Unsupported function: %s not found", functionName)); - } + switch (functionName) { + case "and": + return new AndExecutionNode(childNodes); + case "or": + return new OrExecutionNode(childNodes); + case "not": + Preconditions.checkState(numArguments == 1, "Unsupported number of arguments for NOT operator"); Review Comment: Ack -- 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