[
https://issues.apache.org/jira/browse/TAJO-1673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14903028#comment-14903028
]
ASF GitHub Bot commented on TAJO-1673:
--------------------------------------
Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/626#discussion_r40114921
--- Diff: tajo-docs/src/main/sphinx/sql_language/alter_table.rst ---
@@ -96,4 +96,31 @@ You can use ``ALTER TABLE ADD PARTITION`` to add
partitions to a table. The loca
ALTER TABLE table1 DROP PARTITION (col1 = '2015' , col2 = '01', col3 =
'11' )
ALTER TABLE table1 DROP PARTITION (col1 = 'TAJO' ) PURGE
-You can use ``ALTER TABLE DROP PARTITION`` to drop a partition for a
table. This removes the data for a managed table and this doesn't remove the
data for an external table. But if ``PURGE`` is specified for an external
table, the partition data will be removed. The metadata is completely lost in
all cases. An error is thrown if the partition for the table doesn't exists.
You can use ``IF EXISTS`` to skip the error.
+You can use ``ALTER TABLE DROP PARTITION`` to drop a partition for a
table. This doesn't remove the data for a table. But if ``PURGE`` is specified,
the partition data will be removed. The metadata is completely lost in all
cases. An error is thrown if the partition for the table doesn't exists. You
can use ``IF EXISTS`` to skip the error.
+
+========================
+REPAIR PARTITION
+========================
+
+Tajo stores a list of partitions for each table in its catalog. If
partitions are manually added to the distributed file system, the metastore is
not aware of these partitions. Running the ``ALTER TABLE REPAIR PARTITION``
statement ensures that the tables are properly populated.
+
+*Synopsis*
+
+.. code-block:: sql
+
+ ALTER TABLE <table_name> REPAIR PARTITION
+
+*Examples*
+
+.. code-block:: sql
+
+ ALTER TABLE student REPAIR PARTITION;
--- End diff --
I think this example is so obvious, and thus unnecessary.
> Implement recover partitions
> ----------------------------
>
> Key: TAJO-1673
> URL: https://issues.apache.org/jira/browse/TAJO-1673
> Project: Tajo
> Issue Type: Sub-task
> Components: Catalog
> Reporter: Jaehwa Jung
> Assignee: Jaehwa Jung
> Fix For: 0.11.0, 0.12.0
>
> Attachments: TAJO-1673.patch, TAJO-1673_2.patch
>
>
> Tajo stores a list of partitions for each table in its CatalogStore. If,
> however, new partitions are directly added to HDFS, the CatalogStore will not
> be aware of these partitions unless the user runs ALTER TABLE table_name ADD
> PARTITION commands on each of the newly added partitions.
> However, users can run a CatalogStore check command with the repair table
> option:
> {code:xml}
> MSCK REPAIR TABLE <table_name>
> {code}
> For the reference, I've referenced hive msck command.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)