[ 
https://issues.apache.org/jira/browse/TAJO-1062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14154410#comment-14154410
 ] 

ASF GitHub Bot commented on TAJO-1062:
--------------------------------------

Github user hyunsik commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/156#discussion_r18262542
  
    --- Diff: tajo-docs/src/main/sphinx/tsql/meta_command.rst ---
    @@ -0,0 +1,322 @@
    +*********************************
    +Meta Commands
    +*********************************
    +
    +
    +In tsql, any command that begins with an unquoted backslash ('\') is a 
tsql meta-command that is processed by tsql itself.
    +
    +In the current implementation, there are meta commands as follows: ::
    +
    +  default> \?
    +
    +
    +  General
    +    \copyright    show Apache License 2.0
    +    \version      show Tajo version
    +    \?            show help
    +    \? [COMMAND]  show help of a given command
    +    \help         alias of \?
    +    \q            quit tsql
    +
    +
    +  Informational
    +    \l           list databases
    +    \c           show current database
    +    \c [DBNAME]  connect to new database
    +    \d           list tables
    +    \d [TBNAME]  describe table
    +    \df          list functions
    +    \df NAME     describe function
    +
    +
    +  Tool
    +    \!           execute a linux shell command
    +    \dfs         execute a dfs command
    +    \admin       execute tajo admin command
    +
    +
    +  Variables
    +    \set [[NAME] [VALUE]  set session variable or list session variables
    +    \unset NAME           unset session variable
    +
    +
    +  Documentations
    +    tsql guide        http://tajo.apache.org/docs/current/cli.html
    +    Query language    http://tajo.apache.org/docs/current/sql_language.html
    +    Functions         http://tajo.apache.org/docs/current/functions.html
    +    Backup & restore  
http://tajo.apache.org/docs/current/backup_and_restore.html
    +    Configuration     
http://tajo.apache.org/docs/current/configuration.html
    +
    +-----------------------------------------------
    +Basic usages
    +-----------------------------------------------
    +
    +``\l`` command shows a list of all databases as follows: ::
    +
    +  default> \l
    +  default
    +  tpch
    +  work1
    +  default>
    +
    +
    +
    +``\d`` command shows a list of tables in the current database as follows: 
::
    +
    +  default> \d
    +  customer
    +  lineitem
    +  nation
    +  orders
    +  part
    +  partsupp
    +  region
    +  supplier
    +
    +
    +``\d [table name]`` command also shows a table description as follows: ::
    +
    +  default> \d orders
    +
    +  table name: orders
    +  table path: hdfs:/xxx/xxx/tpch/orders
    +  store type: CSV
    +  number of rows: 0
    +  volume (bytes): 172.0 MB
    +  schema:
    +  o_orderkey      INT8
    +  o_custkey       INT8
    +  o_orderstatus   TEXT
    +  o_totalprice    FLOAT8
    +  o_orderdate     TEXT
    +  o_orderpriority TEXT
    +  o_clerk TEXT
    +  o_shippriority  INT4
    +  o_comment       TEXT
    +
    +
    +
    +The prompt ``default>`` indicates the current database. Basically, all SQL 
statements and meta commands work in the current database. Also, you can change 
the current database with ``\c`` command.
    +
    +.. code-block:: sql
    +
    +  default> \c work1
    +  You are now connected to database "test" as user "hyunsik".
    +  work1>
    +
    +
    +``\df`` command shows a list of all built-in functions as follows: ::
    +
    +  default> \df
    +   Name            | Result type     | Argument types        | Description 
                                  | Type
    +  
-----------------+-----------------+-----------------------+-----------------------------------------------+-----------
    +   abs             | INT4            | INT4                  | Absolute 
value                                | GENERAL
    --- End diff --
    
    I think that we don't need to show all functions. It would be great if you 
can cut some of function lists because function list is not related to this 
manual but too long.


> Update TSQL documentation
> -------------------------
>
>                 Key: TAJO-1062
>                 URL: https://issues.apache.org/jira/browse/TAJO-1062
>             Project: Tajo
>          Issue Type: Sub-task
>          Components: documentation
>            Reporter: Jaehwa Jung
>            Assignee: Jaehwa Jung
>             Fix For: 0.9.0
>
>
> TSQL is very useful tool for tajo users. But currently, we don't provide 
> enough informations to users. Thus, we need to add more informations to 
> following documentation.
> http://tajo.apache.org/docs/current/cli.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to