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

    https://github.com/apache/tajo/pull/624#discussion_r38731533
  
    --- Diff: 
tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/CatalogServer.java
 ---
    @@ -957,7 +957,61 @@ public GetPartitionDescResponse 
getPartitionByPartitionName(RpcController contro
         }
     
         @Override
    -    public GetPartitionsResponse getPartitionsByTableName(RpcController 
controller, PartitionIdentifierProto request)
    +    public ReturnState existPartitionsByTableName(RpcController 
controller, TableIdentifierProto request)
    +      throws ServiceException {
    +      String dbName = request.getDatabaseName();
    +      String tbName = request.getTableName();
    +
    +      try {
    +        // linked meta data do not support partition.
    +        // So, the request that wants to get partitions in this db will be 
failed.
    +        if (linkedMetadataManager.existsDatabase(dbName)) {
    +          return errUndefinedPartitionMethod(tbName);
    +        }
    +      } catch (Throwable t) {
    +        printStackTraceIfError(LOG, t);
    +        return returnError(t);
    +      }
    +
    +      if (metaDictionary.isSystemDatabase(dbName)) {
    +        return errUndefinedPartitionMethod(tbName);
    +      }
    +
    +      rlock.lock();
    +      try {
    +        boolean contain;
    +
    +        contain = store.existDatabase(dbName);
    +        if (contain) {
    --- End diff --
    
    These tests can be improved like other methods. Please refer to 
existsDatabase() method.


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