[ 
https://issues.apache.org/jira/browse/TAJO-1345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14627697#comment-14627697
 ] 

ASF GitHub Bot commented on TAJO-1345:
--------------------------------------

Github user blrunner commented on the pull request:

    https://github.com/apache/tajo/pull/618#issuecomment-121523880
  
    @jihoonson 
    
    I added the exception for above case.
    If there is a directory which is assumed to be a partitioned directory, 
tajo will throw exception as follows.
    
    ```
    default> create table partitioned_nation (n_name text, n_comment text) 
using text partition by column (n_regionkey int8, n_nationkey int8) as select 
n_name, n_comment, n_regionkey, n_nationkey from nation;
    
    default> \dfs -ls /tajo/warehouse/default/partitioned_nation/n_regionkey=1
    Found 5 items
    drwxr-xr-x   - blrunner supergroup          0 2015-07-15 16:21 
/tajo/warehouse/default/partitioned_nation/n_regionkey=1/n_nationkey=1
    drwxr-xr-x   - blrunner supergroup          0 2015-07-15 16:21 
/tajo/warehouse/default/partitioned_nation/n_regionkey=1/n_nationkey=17
    drwxr-xr-x   - blrunner supergroup          0 2015-07-15 16:21 
/tajo/warehouse/default/partitioned_nation/n_regionkey=1/n_nationkey=2
    drwxr-xr-x   - blrunner supergroup          0 2015-07-15 16:21 
/tajo/warehouse/default/partitioned_nation/n_regionkey=1/n_nationkey=24
    drwxr-xr-x   - blrunner supergroup          0 2015-07-15 16:21 
/tajo/warehouse/default/partitioned_nation/n_regionkey=1/n_nationkey=3
    
    default> alter table partitioned_nation add partition (n_regionkey=1, 
n_nationkey=2) location 
'hdfs://localhost:9010/tajo/warehouse/default/partitioned_nation/col1=test2/col2=3';
    ERROR: There is a directory which is assumed to be a partitioned directory 
: 
hdfs://localhost:9010/tajo/warehouse/default/partitioned_nation/n_regionkey=1/n_nationkey=2
    
    default>     alter table partitioned_nation add partition (n_regionkey=1, 
n_nationkey=2) location 
'hdfs://localhost:9010/tajo/warehouse/default/partitioned_nation/col1=test1/col2=2';
    ERROR: There is a directory which is assumed to be a partitioned directory 
: 
hdfs://localhost:9010/tajo/warehouse/default/partitioned_nation/n_regionkey=1/n_nationkey=2
    ```


> Implement logical plan part and DDL executor for alter partition.
> -----------------------------------------------------------------
>
>                 Key: TAJO-1345
>                 URL: https://issues.apache.org/jira/browse/TAJO-1345
>             Project: Tajo
>          Issue Type: Sub-task
>          Components: planner/optimizer
>            Reporter: Jaehwa Jung
>            Assignee: Jaehwa Jung
>             Fix For: 0.11.0
>
>         Attachments: TAJO-1345.patch, TAJO-1345_2.patch
>
>
> See the title. The main objective of this issue is to implement the logical 
> planning part and the DDL executor part for alter table partition support.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to