[
https://issues.apache.org/jira/browse/TAJO-1345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14630646#comment-14630646
]
ASF GitHub Bot commented on TAJO-1345:
--------------------------------------
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.
> 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)