You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tajo.apache.org by "Hyunsik Choi (JIRA)" <ji...@apache.org> on 2013/10/30 17:25:26 UTC
[jira] [Updated] (TAJO-285) Add CREATE TABLE... BY PARTITION
statement to parser
[ https://issues.apache.org/jira/browse/TAJO-285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyunsik Choi updated TAJO-285:
------------------------------
Attachment: TAJO-285.patch
I've attached the first patch. This patch adds RANGE, LIST, HASH, and COLUMN partition options to CREATE TABLE statement. COLUMN partition type is for Hive-style partition.
Each partition type's example is as follows:
{code:title=Hash Partition}
CREATE TABLE sales ( col1 int, col2 int)
PARTITION BY HASH (col1)
PARTITIONS 2;
CREATE TABLE sales ( col1 int, col2 int)
PARTITION BY HASH (col1)
(
PARTITION part1,
PARTITION part2,
PARTITION part3
);
{code}
{code:title=Range Partition}
CREATE TABLE sales ( col1 int, col2 int)
PARTITION BY RANGE (col1)
(
PARTITION col1 VALUES LESS THAN (2),
PARTITION col1 VALUES LESS THAN (5),
PARTITION col1 VALUES LESS THAN (MAXVALUE)
);
{code}
{code:title=List Partition}
CREATE TABLE sales ( col1 int, col2 int)
PARTITION BY LIST (col1)
(
PARTITION col1 VALUES ('Seoul', '서울'),
PARTITION col2 VALUES ('Busan', '부산')
);
{code}
{code:title=List Partition}
CREATE TABLE sales ( col1 int, col2 int)
PARTITION BY LIST (col1)
(
PARTITION col1 VALUES ('Seoul', '서울'),
PARTITION col2 VALUES ('Busan', '부산')
);
{code}
{code:title=Column Partition (Hive Partition)}
CREATE TABLE sales ( col1 int, col2 int)
PARTITION BY COLUMN (col1, col2, col3);
{code}
> Add CREATE TABLE... BY PARTITION statement to parser
> ----------------------------------------------------
>
> Key: TAJO-285
> URL: https://issues.apache.org/jira/browse/TAJO-285
> Project: Tajo
> Issue Type: Sub-task
> Components: parser
> Reporter: Hyunsik Choi
> Fix For: 0.8-incubating
>
> Attachments: TAJO-285.patch
>
>
> We can refer to Oracle, and MySQL. They have well-defined statements.
--
This message was sent by Atlassian JIRA
(v6.1#6144)