[
https://issues.apache.org/jira/browse/IMPALA-7686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gabor Kaszab updated IMPALA-7686:
---------------------------------
Description:
Table creation succeeds this way:
{code:java}
CREATE TABLE test3
(
source_system_id BIGINT,
id1 BIGINT,
id2 BIGINT,
name STRING,
PRIMARY KEY (source_system_id,id1,id2)
)
PARTITION BY
HASH(id1,id2) PARTITIONS 10,
RANGE(source_system_id) (
PARTITION VALUE = 10000000,
PARTITION VALUE = 20000000,
PARTITION VALUE = 30000000
)
STORED AS KUDU;
{code}
However, it fails with a syntax error if we swap the order of HASH() and
RANGE():
{code:java}
CREATE TABLE test3
(
source_system_id BIGINT,
id1 BIGINT,
id2 BIGINT,
name STRING,
PRIMARY KEY (source_system_id,id1,id2)
)
PARTITION BY
RANGE(source_system_id) (
PARTITION VALUE = 10000000,
PARTITION VALUE = 20000000,
PARTITION VALUE = 30000000
),
HASH(id1,id2) PARTITIONS 10
STORED AS KUDU;
{code}
I think we shouldn't restrict the order of RANGE() and HASH().
> Allow RANGE() clause before HASH() clause for PARTITION BY
> ----------------------------------------------------------
>
> Key: IMPALA-7686
> URL: https://issues.apache.org/jira/browse/IMPALA-7686
> Project: IMPALA
> Issue Type: Improvement
> Components: Frontend
> Affects Versions: Impala 2.12.0
> Reporter: Gabor Kaszab
> Priority: Minor
> Labels: newbie
>
> Table creation succeeds this way:
> {code:java}
> CREATE TABLE test3
> (
> source_system_id BIGINT,
> id1 BIGINT,
> id2 BIGINT,
> name STRING,
> PRIMARY KEY (source_system_id,id1,id2)
> )
> PARTITION BY
> HASH(id1,id2) PARTITIONS 10,
> RANGE(source_system_id) (
> PARTITION VALUE = 10000000,
> PARTITION VALUE = 20000000,
> PARTITION VALUE = 30000000
> )
> STORED AS KUDU;
> {code}
> However, it fails with a syntax error if we swap the order of HASH() and
> RANGE():
> {code:java}
> CREATE TABLE test3
> (
> source_system_id BIGINT,
> id1 BIGINT,
> id2 BIGINT,
> name STRING,
> PRIMARY KEY (source_system_id,id1,id2)
> )
> PARTITION BY
> RANGE(source_system_id) (
> PARTITION VALUE = 10000000,
> PARTITION VALUE = 20000000,
> PARTITION VALUE = 30000000
> ),
> HASH(id1,id2) PARTITIONS 10
> STORED AS KUDU;
> {code}
> I think we shouldn't restrict the order of RANGE() and HASH().
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]