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

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

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

    https://github.com/apache/tajo/pull/896#discussion_r49962664
  
    --- Diff: tajo-docs/src/main/sphinx/partitioning/column_partitioning.rst ---
    @@ -11,22 +11,50 @@ How to Create a Column Partitioned Table
     You can create a partitioned table by using the ``PARTITION BY`` clause. 
For a column partitioned table, you should use
     the ``PARTITION BY COLUMN`` clause with partition keys.
     
    -For example, assume there is a table ``orders`` composed of the following 
schema. ::
    +For example, assume a table with the following schema.
     
    -  id          INT,
    -  item_name   TEXT,
    -  price       FLOAT
    +.. code-block:: sql
    +
    +  id        INT,
    +  name      TEXT,
    +  gender    char(1),
    +  grade     TEXT,
    +  country   TEXT,
    +  city      TEXT,
    +  phone     TEXT
    +  );
     
    -Also, assume that you want to use ``order_date TEXT`` and ``ship_date 
TEXT`` as the partition keys.
    -Then, you should create a table as follows:
    +If you want to make country as partitioned column, your Tajo definition 
would be this:
     
     .. code-block:: sql
     
    -  CREATE TABLE orders (
    -    id INT,
    -    item_name TEXT,
    -    price
    -  ) PARTITION BY COLUMN (order_date TEXT, ship_date TEXT);
    +  CREATE TABLE student (
    +    id        INT,
    +    name      TEXT,
    +    gender    char(1),
    +    grade     TEXT,
    +    city      TEXT,
    +    phone     TEXT
    +  ) PARTITION BY COLUMN (country TEXT);
    +
    +Now your users will still query on ``WHERE country = '...'`` but the 2nd 
column will be the original values.
    +Here's an example statement to create a table:
    +
    +.. code-block:: sql
    +
    +  CREATE TABLE student (
    +    id        INT,
    +    name      TEXT,
    +    gender    char(1),
    +    grade     TEXT,
    +    phone     TEXT
    +  ) USING PARQUET
    +  PARTITION BY COLUMN (country TEXT, city TEXT);
    +
    +The statement above creates the student table with id, name, grade. The 
table is also partitioned and data is stored in parquet files.
    --- End diff --
    
    'with id, name, grade' looks ambiguous. Did you miss something like 'etc.'?


> Update Partition Table document
> -------------------------------
>
>                 Key: TAJO-1740
>                 URL: https://issues.apache.org/jira/browse/TAJO-1740
>             Project: Tajo
>          Issue Type: Sub-task
>          Components: Documentation
>            Reporter: Jaehwa Jung
>            Assignee: Jaehwa Jung
>             Fix For: 0.12.0
>
>         Attachments: TAJO-1740.patch
>
>
> Currently, Tajo doesn't provide enough informations about partition table. 
> Thus, we need to add more informations to following documentation.
> http://tajo.apache.org/docs/current/partitioning/column_partitioning.html



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

Reply via email to