You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/12/09 00:39:52 UTC
[GitHub] [pinot] kishansairam9 commented on a change in pull request #7877: Improve unsupported function error msg (#7609)
kishansairam9 commented on a change in pull request #7877:
URL: https://github.com/apache/pinot/pull/7877#discussion_r765349404
##########
File path: pinot-common/src/main/java/org/apache/pinot/common/function/FunctionRegistry.java
##########
@@ -106,14 +107,18 @@ public static boolean containsFunction(String functionName) {
}
/**
- * Returns the {@link FunctionInfo} associated with the given function name and number of parameters, or {@code null}
- * if there is no matching method. This method should be called after the FunctionRegistry is initialized and all
- * methods are already registered.
+ * Returns a pair <{@code true}, {@link FunctionInfo}> associated with the given function name and number of
+ * parameters if it exists, <{@code true}, {@code null}> if method exists but number of parameters do not match,
+ * else if there is no matching method <{@code false}, {@code null}>. This method should be called after the
+ * FunctionRegistry is initialized and all methods are already registered.
*/
@Nullable
- public static FunctionInfo getFunctionInfo(String functionName, int numParameters) {
+ public static ImmutablePair<Boolean, FunctionInfo> getFunctionInfo(String functionName, int numParameters) {
Review comment:
Thank you for your feedback! While trying to refactor with an exception I realised we have `containsFunction` method for `FunctionRegistry` class which can be used for the required functionailty. I will update PR with required logic, apologies for the overlook.
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org