Repository: tajo Updated Branches: refs/heads/branch-0.11.0 4ac2a4c4a -> a39355a65
TAJO-1853: Add tablespace syntax to the CREATE TABLE section of DDL page. Project: http://git-wip-us.apache.org/repos/asf/tajo/repo Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/a39355a6 Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/a39355a6 Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/a39355a6 Branch: refs/heads/branch-0.11.0 Commit: a39355a65143eb518c7ebad76e2b8d3a1405d17f Parents: 4ac2a4c Author: Jihoon Son <[email protected]> Authored: Thu Sep 17 12:30:48 2015 +0900 Committer: Jihoon Son <[email protected]> Committed: Thu Sep 17 12:30:48 2015 +0900 ---------------------------------------------------------------------- CHANGES | 3 +++ tajo-docs/src/main/sphinx/sql_language/ddl.rst | 22 +++++++++++++++++--- .../sphinx/table_management/table_overview.rst | 2 +- 3 files changed, 23 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tajo/blob/a39355a6/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index a764984..df8ecdf 100644 --- a/CHANGES +++ b/CHANGES @@ -547,6 +547,9 @@ Release 0.11.0 - unreleased TASKS + TAJO-1853: Add tablespace syntax to the CREATE TABLE section of DDL page. + (jihoon) + TAJO-1493: Make partition pruning based on catalog informations. (jaehwa) TAJO-1824: Remove partition_keys table from information_schema. (jaehwa) http://git-wip-us.apache.org/repos/asf/tajo/blob/a39355a6/tajo-docs/src/main/sphinx/sql_language/ddl.rst ---------------------------------------------------------------------- diff --git a/tajo-docs/src/main/sphinx/sql_language/ddl.rst b/tajo-docs/src/main/sphinx/sql_language/ddl.rst index 662ccff..011f42e 100644 --- a/tajo-docs/src/main/sphinx/sql_language/ddl.rst +++ b/tajo-docs/src/main/sphinx/sql_language/ddl.rst @@ -10,8 +10,11 @@ CREATE DATABASE .. code-block:: sql - CREATE DATABASE [IF NOT EXISTS] <database_name> + CREATE DATABASE [IF NOT EXISTS] <database_name> +*Description* + +Database is the namespace in Tajo. A database can contain multiple tables which have unique name in it. ``IF NOT EXISTS`` allows ``CREATE DATABASE`` statement to avoid an error which occurs when the database exists. ======================== @@ -34,12 +37,18 @@ CREATE TABLE .. code-block:: sql - CREATE TABLE [IF NOT EXISTS] <table_name> [(<column_name> <data_type>, ... )] + CREATE TABLE [IF NOT EXISTS] <table_name> [(<column_name> <data_type>, ... )] [TABLESPACE tablespace_name] [using <storage_type> [with (<key> = <value>, ...)]] [AS <select_statement>] CREATE EXTERNAL TABLE [IF NOT EXISTS] <table_name> (<column_name> <data_type>, ... ) using <storage_type> [with (<key> = <value>, ...)] LOCATION '<path>' +*Description* + +In Tajo, there are two types of tables, `managed table` and `external table` (For more information, please refer to :doc:`/table_management/table_overview`.) + +Managed tables are placed on some predefined tablespaces. The ``TABLESPACE`` clause is to specify a tablespace for this table. For more information about tablespace, please refer to :doc:`/table_management/tablespaces`. For external tables, Tajo allows an arbitrary table location with the ``LOCATION`` clause. + ``IF NOT EXISTS`` allows ``CREATE [EXTERNAL] TABLE`` statement to avoid an error which occurs when the table does not exist. ------------------------ @@ -75,6 +84,8 @@ If you want to add an external table that contains compressed data, you should g DROP TABLE [IF EXISTS] <table_name> [PURGE] +*Description* + ``IF EXISTS`` allows ``DROP DATABASE`` statement to avoid an error which occurs when the database does not exist. ``DROP TABLE`` statement removes a table from Tajo catalog, but it does not remove the contents. If ``PURGE`` option is given, ``DROP TABLE`` statement will eliminate the entry in the catalog as well as the contents. ======================== @@ -89,6 +100,11 @@ If you want to add an external table that contains compressed data, you should g ( { column_name | ( expression ) } [ ASC | DESC ] [ NULLS { FIRST | LAST } ] [, ...] ) [ WHERE predicate ] +*Description* + +Tajo supports index for fast data retrieval. Currently, index is supported for only plain ``TEXT`` formats stored on ``HDFS``. +For more information, please refer to :doc:`/index_overview`. + ------------------------ Index method ------------------------ @@ -106,4 +122,4 @@ Index methods: .. code-block:: sql - DROP INDEX name \ No newline at end of file + DROP INDEX name http://git-wip-us.apache.org/repos/asf/tajo/blob/a39355a6/tajo-docs/src/main/sphinx/table_management/table_overview.rst ---------------------------------------------------------------------- diff --git a/tajo-docs/src/main/sphinx/table_management/table_overview.rst b/tajo-docs/src/main/sphinx/table_management/table_overview.rst index 5818106..d030b4a 100644 --- a/tajo-docs/src/main/sphinx/table_management/table_overview.rst +++ b/tajo-docs/src/main/sphinx/table_management/table_overview.rst @@ -15,7 +15,7 @@ Please refer to :doc:`/table_management/tablespaces` if you want to know more in Managed Table ================ -``CREATE TABLE`` statement with ``EXTERNAL`` keyword lets you create a table located in the warehouse directory specified by the configuration property ``tajo.warehouse.directory`` or ``${tajo.root}/warehouse`` by default. For example: +``CREATE TABLE`` statement lets you create a table located in the warehouse directory specified by the configuration property ``tajo.warehouse.directory`` or ``${tajo.root}/warehouse`` by default. For example: .. code-block:: sql
