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

    https://github.com/apache/tajo/pull/624#discussion_r39001856
  
    --- Diff: 
tajo-catalog/tajo-catalog-client/src/main/java/org/apache/tajo/catalog/AbstractCatalogClient.java
 ---
    @@ -446,6 +450,52 @@ 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));
    --- End diff --
    
    Even through this API is checking if the table exists, it potentially 
returns unexpected exception. If you check only its success, it may return a 
wrong result.
    
    So, you should return true or false depending on only both its success and 
UNDEFINED_PARTITION_METHODS. You can find the similar code pattern from 
``existPartitionMethod`` method in this class.


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