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


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