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

    https://github.com/apache/tajo/pull/680#discussion_r36612071
  
    --- Diff: 
tajo-client/src/main/java/org/apache/tajo/client/CatalogAdminClientImpl.java ---
    @@ -164,21 +166,22 @@ public TableDesc createExternalTable(final String 
tableName, final Schema schema
           throw new RuntimeException(e);
         }
     
    -    if (isThisError(res.getState(), Errors.ResultCode.DUPLICATE_TABLE)) {
    -      throw new DuplicateTableException(res.getState());
    -    }
    +    throwsIfThisError(res.getState(), DuplicateTableException.class);
    +    throwsIfThisError(res.getState(), 
InsufficientPrivilegeException.class);
    --- End diff --
    
    The above two exceptions should be properly thrown when 
TajoMasterClientService.createExternalTable() is called.
    For more detailed, these exceptions should be caught at the following code 
(TajoMasterClientService::887), and then thrown properly to handle them here.
    ```
    TableDesc desc = 
context.getGlobalEngine().getDDLExecutor().getCreateTableExecutor().create(
                queryContext,
                request.getName(),
                null,
                schema,
                meta,
                path.toUri(),
                true,
                partitionDesc,
                false
            );
    ```


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