Github user hyunsik commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/624#discussion_r38730338
  
    --- Diff: 
tajo-catalog/tajo-catalog-client/src/main/java/org/apache/tajo/catalog/AbstractCatalogClient.java
 ---
    @@ -446,6 +446,46 @@ public final PartitionDescProto getPartition(final 
String databaseName, final St
       }
     
       @Override
    +  public boolean existPartitions(String databaseName, String tableName) {
    +    try {
    +      final BlockingInterface stub = getStub();
    +      final TableIdentifierProto request = 
buildTableIdentifier(databaseName, tableName);
    +      return isSuccess(stub.existPartitionsByTableName(null, request));
    +    } catch (ServiceException e) {
    +      throw new RuntimeException(e);
    +    }
    +  }
    +
    +  @Override
    +  public List<PartitionDescProto> 
getPartitionsByAlgebra(PartitionsByAlgebraProto request) throws
    +    UndefinedDatabaseException, UndefinedTableException, 
UndefinedPartitionMethodException,
    +    UndefinedOperatorException {
    +    try {
    +      final BlockingInterface stub = getStub();
    +      GetPartitionsResponse response = stub.getPartitionsByAlgebra(null, 
request);
    +      ensureOk(response.getState());
    +    return response.getPartitionList();
    +    } catch (ServiceException e) {
    +      LOG.error(e.getMessage(), e);
    +      return null;
    +    }
    +  }
    +
    +  @Override
    +  public List<PartitionDescProto> 
getPartitionsByDirectSql(PartitionsByDirectSqlProto request) throws
    +    UndefinedDatabaseException, UndefinedTableException, 
UndefinedPartitionMethodException,
    --- End diff --
    
    To handle such exceptions, you should put throwsIfThisError method for the 
exceptions. Please refer to 
https://github.com/apache/tajo/pull/624/files#diff-9ecb2222e062d0cc008fb1c3da61d4b0L483.


---
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.
---

Reply via email to