You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tajo.apache.org by jh...@apache.org on 2014/10/15 11:16:39 UTC
[09/50] [abbrv] git commit: Update tsql documentation.
Update tsql documentation.
Project: http://git-wip-us.apache.org/repos/asf/tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/e59fe460
Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/e59fe460
Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/e59fe460
Branch: refs/heads/block_iteration
Commit: e59fe460cc888bfebe968619405edd9b9e57e410
Parents: 0e63abc
Author: Jaehwa Jung <bl...@apache.org>
Authored: Sat Sep 27 16:50:08 2014 +0900
Committer: Jaehwa Jung <bl...@apache.org>
Committed: Sat Sep 27 16:50:08 2014 +0900
----------------------------------------------------------------------
tajo-docs/src/main/sphinx/cli.rst | 2 +-
.../src/main/sphinx/tsql/admin_command.rst | 10 ++++----
tajo-docs/src/main/sphinx/tsql/back_command.rst | 2 +-
tajo-docs/src/main/sphinx/tsql/dfs_command.rst | 2 +-
tajo-docs/src/main/sphinx/tsql/execute_file.rst | 2 +-
tajo-docs/src/main/sphinx/tsql/intro.rst | 2 +-
tajo-docs/src/main/sphinx/tsql/meta_command.rst | 27 +++++++++++++-------
7 files changed, 28 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tajo/blob/e59fe460/tajo-docs/src/main/sphinx/cli.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/cli.rst b/tajo-docs/src/main/sphinx/cli.rst
index 6684508..5fd2461 100644
--- a/tajo-docs/src/main/sphinx/cli.rst
+++ b/tajo-docs/src/main/sphinx/cli.rst
@@ -2,7 +2,7 @@
Command-line Interface
*****************************
-Tajo provides a shell utility for users. It is the command-line interface (CLI). Using the CLI, users can create or drop tables, inspect schema and query tables, etc. For reference, we named its name to tsql.
+Tajo provides a shell utility named Tsql. It is a command-line interface (CLI) where users can create or drop tables, inspect schema and query tables, etc.
.. toctree::
:maxdepth: 1
http://git-wip-us.apache.org/repos/asf/tajo/blob/e59fe460/tajo-docs/src/main/sphinx/tsql/admin_command.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/tsql/admin_command.rst b/tajo-docs/src/main/sphinx/tsql/admin_command.rst
index cffa9e6..1a3e90e 100644
--- a/tajo-docs/src/main/sphinx/tsql/admin_command.rst
+++ b/tajo-docs/src/main/sphinx/tsql/admin_command.rst
@@ -7,7 +7,7 @@ Administration Commands
Synopsis
==========
-Tsql provides commands for administrator as follows as follows:
+Tsql provides commands for administrator as follows:
.. code-block:: sql
@@ -26,7 +26,7 @@ Tsql provides commands for administrator as follows as follows:
Basic usages
-----------------------------------------------
-``-list`` options shows a list of all running queries as follows: ::
+``-list`` option shows a list of all running queries as follows: ::
default> \admin -list
QueryId State StartTime Query
@@ -34,7 +34,7 @@ Basic usages
q_1411357607375_0006 QUERY_RUNNING 2014-09-23 07:19:40 select count(*) from lineitem
-``-desc`` options shows a detailed description of a specified running query s as follows: ::
+``-desc`` option shows a detailed description of a specified running query as follows: ::
default> \admin -desc q_1411357607375_0006
Id: 1
@@ -47,14 +47,14 @@ Basic usages
select count(*) from lineitem
-``-kill`` options kills a specified running queries as follows: ::
+``-kill`` option kills a specified running query as follows: ::
default> \admin -kill q_1411357607375_0007
q_1411357607375_0007 is killed successfully.
-``-showmasters`` options shows a list of all tajo masters as follows: ::
+``-showmasters`` option shows a list of all tajo masters as follows: ::
default> \admin -showmasters
grtajo01
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tajo/blob/e59fe460/tajo-docs/src/main/sphinx/tsql/back_command.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/tsql/back_command.rst b/tajo-docs/src/main/sphinx/tsql/back_command.rst
index 56bdd71..ad46f26 100644
--- a/tajo-docs/src/main/sphinx/tsql/back_command.rst
+++ b/tajo-docs/src/main/sphinx/tsql/back_command.rst
@@ -3,7 +3,7 @@ Executing as background process
*********************************
-If you execute tsql as background process, tsql will exit before execute a query because of jconsole architecture as
+If you execute tsql as a background process, tsql will exit before executing a query because of jconsole architecture as
follows:
.. code-block:: sql
http://git-wip-us.apache.org/repos/asf/tajo/blob/e59fe460/tajo-docs/src/main/sphinx/tsql/dfs_command.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/tsql/dfs_command.rst b/tajo-docs/src/main/sphinx/tsql/dfs_command.rst
index b6cb463..e261159 100644
--- a/tajo-docs/src/main/sphinx/tsql/dfs_command.rst
+++ b/tajo-docs/src/main/sphinx/tsql/dfs_command.rst
@@ -2,7 +2,7 @@
Executing HDFS commands
*********************************
-You can run the hadoop dfs commands(FsShell) within tsql. ``\dfs`` command allows the hadoop dfs commands. If you want to use this command, you just specify FsShell arguments and add the semicolon at the end as follows:
+You can run the hadoop dfs command(FsShell) within tsql. ``\dfs`` command provides a shortcut to the hadoop dfs commands. If you want to use this command, just specify FsShell arguments and add the semicolon at the end as follows:
.. code-block:: sql
http://git-wip-us.apache.org/repos/asf/tajo/blob/e59fe460/tajo-docs/src/main/sphinx/tsql/execute_file.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/tsql/execute_file.rst b/tajo-docs/src/main/sphinx/tsql/execute_file.rst
index 014f513..a513973 100644
--- a/tajo-docs/src/main/sphinx/tsql/execute_file.rst
+++ b/tajo-docs/src/main/sphinx/tsql/execute_file.rst
@@ -39,7 +39,7 @@ Tajo can execute more queries that were saved to a file using the -f file argume
Setting parameter value in SQL file
-----------------------------------------------
-If you wish to set a parameter value in the SQL file, you can set with the -param key=value option.When you use this feature, you have to use the parameter in the file as follows:
+If you wish to set a parameter value in the SQL file, you can set with the -param key=value option. When you use this feature, you have to use the parameter in the file as follows:
.. code-block:: sql
http://git-wip-us.apache.org/repos/asf/tajo/blob/e59fe460/tajo-docs/src/main/sphinx/tsql/intro.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/tsql/intro.rst b/tajo-docs/src/main/sphinx/tsql/intro.rst
index badaead..4ca6d87 100644
--- a/tajo-docs/src/main/sphinx/tsql/intro.rst
+++ b/tajo-docs/src/main/sphinx/tsql/intro.rst
@@ -17,7 +17,7 @@ Options
* ``-c "quoted sql"`` : Execute quoted sql statements, and then the shell will exist.
* ``-f filename (--file filename)`` : Use the file named filename as the source of commands instead of interactive shell.
* ``-h hostname (--host hostname)`` : Specifies the host name of the machine on which the Tajo master is running.
-* ``-p port (--port port)`` : Specifies the TCP port. If it is not set, the port will be 26002 in default.
+* ``-p port (--port port)`` : Specifies the TCP port. If it is not set, the port will be 26002 by default.
* ``-conf configuration (--conf configuration)`` : Setting tajo configuration value.
* ``-param parameter (--param parameter)`` : Use a parameter value in SQL file.
* ``-B (--background)`` : Execute as background process.
http://git-wip-us.apache.org/repos/asf/tajo/blob/e59fe460/tajo-docs/src/main/sphinx/tsql/meta_command.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/tsql/meta_command.rst b/tajo-docs/src/main/sphinx/tsql/meta_command.rst
index b183cf5..a147f2c 100644
--- a/tajo-docs/src/main/sphinx/tsql/meta_command.rst
+++ b/tajo-docs/src/main/sphinx/tsql/meta_command.rst
@@ -105,7 +105,7 @@ The prompt ``default>`` indicates the current database. Basically, all SQL state
work1>
-``\df`` command shows a list of all buit-in function as follows: ::
+``\df`` command shows a list of all built-in functions as follows: ::
default> \df
Name | Result type | Argument types | Description | Type
@@ -297,17 +297,26 @@ The prompt ``default>`` indicates the current database. Basically, all SQL state
``\df [function name]`` command also shows a function description as follows: ::
- default> \df trim
+ default> \df round;
Name | Result type | Argument types | Description | Type
-----------------+-----------------+-----------------------+-----------------------------------------------+-----------
- trim | TEXT | TEXT | Remove the longest string consisting only of | GENERAL
- trim | TEXT | TEXT,TEXT | Remove the longest string consisting only of | GENERAL
+ round | INT8 | FLOAT4 | Round to nearest integer. | GENERAL
+ round | INT8 | FLOAT8 | Round to nearest integer. | GENERAL
+ round | INT8 | INT4 | Round to nearest integer. | GENERAL
+ round | INT8 | INT8 | Round to nearest integer. | GENERAL
+ round | FLOAT8 | FLOAT8,INT4 | Round to s decimalN places. | GENERAL
+ round | FLOAT8 | INT8,INT4 | Round to s decimalN places. | GENERAL
- (2) rows
+ (6) rows
- Function: TEXT trim(text)
- Description: Remove the longest string consisting only of characters in characters (a space by default) from the start and end of string.
+ Function: INT8 round(float4)
+ Description: Round to nearest integer.
Example:
- > SELECT trim('xyxtrimyyx', 'xy');
- trim
+ > SELECT round(42.4)
+ 42
+ Function: FLOAT8 round(float8,int4)
+ Description: Round to s decimalN places.
+ Example:
+ > SELECT round(42.4382, 2)
+ 42.44
\ No newline at end of file