[CARBONDATA-856] Alter Table - TABLE RENAME feature documentation

The documentation for Table rename as part of the alter table feature.

Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/b2950b44
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/b2950b44
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/b2950b44

Branch: refs/heads/12-dev
Commit: b2950b44482bfdf51e3ae4879f081a3bb9f93e28
Parents: cfefb74
Author: srigopalmohanty <knowledge.gatherer....@gmail.com>
Authored: Fri Apr 7 13:10:36 2017 +0530
Committer: chenliang613 <chenliang...@huawei.com>
Committed: Fri Apr 7 15:02:50 2017 +0530

----------------------------------------------------------------------
 docs/ddl-operation-on-carbondata.md | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/b2950b44/docs/ddl-operation-on-carbondata.md
----------------------------------------------------------------------
diff --git a/docs/ddl-operation-on-carbondata.md 
b/docs/ddl-operation-on-carbondata.md
index 215cff8..392bb39 100644
--- a/docs/ddl-operation-on-carbondata.md
+++ b/docs/ddl-operation-on-carbondata.md
@@ -28,6 +28,7 @@ The following DDL operations are supported in CarbonData :
 * [DROP TABLE](#drop-table)
 * [COMPACTION](#compaction)
 * [BUCKETING](#bucketing)
+* [TABLE RENAME](#table-rename)
 
 ## CREATE TABLE
   This command can be used to create a CarbonData table by specifying the list 
of fields along with the table properties.
@@ -229,3 +230,31 @@ of columns is used.
                   'BUCKETCOLUMNS'='productName')
  ```
 
+## TABLE RENAME
+  This command is used to rename the existing table.
+
+### Syntax
+```
+   ALTER TABLE [db_name.]table_name RENAME TO new_table_name;
+```
+
+### Parameter Description
+
+| Parameter | Description | 
+|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
+| db_name | Name of the database. If this parameter is left unspecified, the 
current database is selected. | 
+| table_name | Name of the existing table.|
+|new_table_name | New table name for the existing table. | 
+
+### Usage Guidelines
+Following conditions must be met for successful rename operation:
+* Queries running in parallel which requires the formation of path using the 
table name for reading carbon store files might fail during this operation.
+* Secondary index table rename is not permitted.
+
+### Example:
+```
+    ALTER TABLE carbon RENAME TO carbondata;
+
+   ALTER TABLE test_db.carbon RENAME TO test_db.carbondata;
+```
+

Reply via email to