Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/680#discussion_r36610170
--- Diff:
tajo-catalog/tajo-catalog-client/src/main/java/org/apache/tajo/catalog/AbstractCatalogClient.java
---
@@ -754,26 +801,19 @@ public final FunctionDesc getFunction(final String
signature, FunctionType funcT
builder.addParameterTypes(type);
}
- FunctionResponse response = null;
try {
final BlockingInterface stub = getStub();
- response = stub.getFunctionMeta(null, builder.build());
- } catch (ServiceException se) {
- throw new RuntimeException(se);
- }
-
- if (isThisError(response.getState(), ResultCode.UNDEFINED_FUNCTION)) {
- throw new UndefinedFunctionException(signature, paramTypes);
- } else if (isThisError(response.getState(),
ResultCode.AMBIGUOUS_FUNCTION)) {
- throw new AmbiguousFunctionException(signature, paramTypes);
- }
+ final FunctionResponse response = stub.getFunctionMeta(null,
builder.build());
--- End diff --
If there are several functions of the given name, getFunctionMeta() always
throws a function which has the nearest argument among them instead of throwing
```AmbiguousFunctionException```.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---