[
https://issues.apache.org/jira/browse/TAJO-1284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14374992#comment-14374992
]
Jaehwa Jung commented on TAJO-1284:
-----------------------------------
I updated the index for related tables and Tajo can get related partition
directories with just one SELECT statement.
For example, consider you have a partitioned table for three columns (i.e.,
col1, col2, col3).
Then, you can write WHERE statement as follows:
{code:xml}
WHERE col1 is not null and col2 = 3 and col3 is not null
{code}
In such as above, Tajo can get the partition directories as follows:
{code:xml}
SELECT DISTINCT A.PATH
FROM PARTITIONS A, (
SELECT B.PID
FROM PARTITION_KEYS B
WHERE B.PID > 0
AND (
(B.COLUMN_NAME = 'col1' AND B.PARTITION_VALUE IS NOT NULL)
OR (B.COLUMN_NAME = 'col2' AND B.PARTITION_VALUE = 3)
OR (B.COLUMN_NAME = 'col3' AND B.PARTITION_VALUE IS NOT NULL)
)
) B
WHERE A.PID > 0
AND A.TID = 33
AND A.PID = B.PID
{code}
For the reference, I'll create new issue for supporting this function.
> Add alter partition method to CatalogStore
> ------------------------------------------
>
> Key: TAJO-1284
> URL: https://issues.apache.org/jira/browse/TAJO-1284
> Project: Tajo
> Issue Type: Sub-task
> Components: catalog
> Reporter: Jaehwa Jung
> Assignee: Jaehwa Jung
> Attachments: TAJO-1260.png, TAJO-1260.sql, TAJO-1284.patch,
> TAJO-1284_2.png, TAJO-1284_2.sql
>
>
> This patch will implement ALTER TABLE ADD PARTITION method and ALTER TABLE
> DROP PARTITION method to CatalogStore.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)