Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/680#discussion_r36609754
--- Diff:
tajo-catalog/tajo-catalog-client/src/main/java/org/apache/tajo/catalog/AbstractCatalogClient.java
---
@@ -471,31 +500,35 @@ public boolean addPartitions(String databaseName,
String tableName, List<Partiti
@Override
public final Collection<FunctionDesc> getFunctions() {
List<FunctionDesc> list = new ArrayList<FunctionDesc>();
+
try {
- GetFunctionsResponse response;
- BlockingInterface stub = getStub();
- response = stub.getFunctions(null, NullProto.newBuilder().build());
- int size = response.getFunctionDescCount();
- for (int i = 0; i < size; i++) {
+ final BlockingInterface stub = getStub();
+ final GetFunctionsResponse response = stub.getFunctions(null,
NullProto.newBuilder().build());
+
+ ensureOk(response.getState());
+ for (int i = 0; i < response.getFunctionDescCount(); i++) {
try {
list.add(new FunctionDesc(response.getFunctionDesc(i)));
} catch (ClassNotFoundException e) {
- LOG.error(e, e);
- return list;
+ throw new RuntimeException(e);
}
}
return list;
+
} catch (ServiceException e) {
throw new RuntimeException(e);
}
}
@Override
- public final boolean createTable(final TableDesc desc) {
+ public final void createTable(final TableDesc desc) throws
DuplicateTableException, InsufficientPrivilegeException {
--- End diff --
```UndefinedDatabaseException``` should be handled.
---
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.
---