Jackie-Jiang commented on a change in pull request #7877:
URL: https://github.com/apache/pinot/pull/7877#discussion_r765372462
##########
File path:
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/function/InbuiltFunctionEvaluator.java
##########
@@ -69,6 +69,8 @@ private ExecutableNode planExecution(ExpressionContext
expression) {
childNodes[i] = planExecution(arguments.get(i));
}
String functionName = function.getFunctionName();
+
Preconditions.checkState(FunctionRegistry.containsFunction(functionName),
"Unsupported function: %s not found",
Review comment:
Same here
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/query/postaggregation/PostAggregationFunction.java
##########
@@ -36,6 +36,8 @@
private final ColumnDataType _resultType;
public PostAggregationFunction(String functionName, ColumnDataType[]
argumentTypes) {
+
Preconditions.checkArgument(FunctionRegistry.containsFunction(functionName),
"Unsupported function: %s not found",
Review comment:
Suggest expanding the existing preconditions check similar to how it is
handled in `TransformFunctionFactory` to avoid the unnecessary overhead
```suggestion
if (functionInfo == null) {
if (FunctionRegistry.containsFunction(functionName)) {
throw new IllegalArgumentException(...);
} else {
throw new IllegalArgumentException(...);
}
}
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]