Github user jihoonson commented on the pull request:
https://github.com/apache/tajo/pull/618#issuecomment-122144338
@blrunner thanks for update.
However, there still remains a similar problem when dropping a partition.
That is, newly added partitions with ```alter table``` statement are
successfully dropped, but others are not.
Here is an example.
```
tpch> \d partitioned_nation
table name: tpch.partitioned_nation
table uri:
hdfs://localhost:7020/tajo/warehouse/warehouse/tpch/partitioned_nation
store type: text
number of rows: 25
volume: 2.1 kB
Options:
'text.delimiter'='|'
schema:
n_name TEXT
n_comment TEXT
Partitions:
type:COLUMN
columns::n_regionkey (INT8), n_nationkey (INT8)
tpch> \dfs -ls
hdfs://localhost:7020/tajo/warehouse/warehouse/tpch/partitioned_nation/n_regionkey=1
Found 5 items
drwxr-xr-x - jihoon supergroup 0 2015-07-17 10:20
hdfs://localhost:7020/tajo/warehouse/warehouse/tpch/partitioned_nation/n_regionkey=1/n_nationkey=1
drwxr-xr-x - jihoon supergroup 0 2015-07-17 10:20
hdfs://localhost:7020/tajo/warehouse/warehouse/tpch/partitioned_nation/n_regionkey=1/n_nationkey=17
drwxr-xr-x - jihoon supergroup 0 2015-07-17 10:20
hdfs://localhost:7020/tajo/warehouse/warehouse/tpch/partitioned_nation/n_regionkey=1/n_nationkey=2
drwxr-xr-x - jihoon supergroup 0 2015-07-17 10:20
hdfs://localhost:7020/tajo/warehouse/warehouse/tpch/partitioned_nation/n_regionkey=1/n_nationkey=24
drwxr-xr-x - jihoon supergroup 0 2015-07-17 10:20
hdfs://localhost:7020/tajo/warehouse/warehouse/tpch/partitioned_nation/n_regionkey=1/n_nationkey=3
tpch> alter table partitioned_nation drop partition (n_regionkey=1,
n_nationkey=2);
ERROR: "n_regionkey=1/n_nationkey=2" is not the partition of
"partitioned_nation".
tpch> alter table partitioned_nation drop partition (n_regionkey=10,
n_nationkey=2);
OK
```
As you can see in this example, the partition of (n_regionkey=1,
n_nationkey=2) exists, but dropping it is failed.
The fundamental problem seems that partition information is not maintained
by catalog. I believe that this will be resolved in
https://issues.apache.org/jira/browse/TAJO-1346, and thus the above problem
will be resolved, too.
So, I'll give +1. Thanks for your long time work.
---
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.
---