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

    https://github.com/apache/tajo/pull/602#discussion_r33039748
  
    --- Diff: 
tajo-core/src/main/java/org/apache/tajo/master/exec/QueryExecutor.java ---
    @@ -436,14 +476,17 @@ public void executeDistributedQuery(QueryContext 
queryContext, Session session,
                                           SubmitQueryResponse.Builder 
responseBuilder) throws Exception {
         LogicalRootNode rootNode = plan.getRootBlock().getRoot();
     
    -    String storeType = PlannerUtil.getStoreType(plan);
    -    if (storeType != null) {
    -      Tablespace sm = 
TableSpaceManager.getStorageManager(context.getConf(), storeType);
    -      StorageProperty storageProperty = sm.getStorageProperty();
    -      if (!storageProperty.isSupportsInsertInto()) {
    +    TableDesc tableDesc = PlannerUtil.getTableDesc(catalog, 
plan.getRootBlock().getRoot());
    +    if (tableDesc != null) {
    +
    +      Tablespace space = TablespaceManager.get(tableDesc.getUri()).get();
    +      FormatProperty formatProperty = 
space.getFormatProperty(tableDesc.getMeta());
    +
    +      if (!formatProperty.isInsertable()) {
             throw new VerifyException("Inserting into non-file storage is not 
supported.");
    --- End diff --
    
    It would be better if the storage name is printed with this exception.


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