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

ASF subversion and git services commented on IMPALA-6929:
---------------------------------------------------------

Commit b1a57f692da9b40e6d0ca5c331246be6f1d74cac in impala's branch 
refs/heads/2.x from [~twmarshall]
[ https://git-wip-us.apache.org/repos/asf?p=impala.git;h=b1a57f6 ]

IMPALA-6929: Support multi-column range partitions for Kudu

Kudu allows specifying range partitions over multiple columns. Impala
already has support for doing this when the partitions are specified
with '=', but if the partitions are specified with '<' or '<=', the
parser would return an error.

This patch modifies the parser to allow for creating Kudu tables like:
create table kudu_test (a int, b int, primary key(a, b))
  partition by range(a, b) (partition (0, 0) <= values < (1, 1));
and similary to alter partitions like:
alter table kudu_test add range partition (1, 1) <= values < (2, 2);

Testing:
- Modified functional_kudu.jointbl's schema so that we have a table
  in functional with a multi-column range partition to test things
  against.
- Added FE and E2E tests for CREATE and ALTER.

Change-Id: I0141dd3344a4f22b186f513b7406f286668ef1e7
Reviewed-on: http://gerrit.cloudera.org:8080/10441
Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>


> Create Kudu table syntax does not allow multi-column range partitions
> ---------------------------------------------------------------------
>
>                 Key: IMPALA-6929
>                 URL: https://issues.apache.org/jira/browse/IMPALA-6929
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 2.11.0
>            Reporter: Dan Burkert
>            Assignee: Thomas Tauber-Marshall
>            Priority: Major
>
> The Impala CREATE TABLE syntax guide includes this bit of grammar in the Kudu 
> partitioning section:
> {code:java}
> range_clause ::=
>   RANGE [ (pk_col [, ...]) ]
>   (
>     {
>       PARTITION constant_expression range_comparison_operator VALUES 
> range_comparison_operator constant_expression
>       | PARTITION VALUE = constant_expression_or_tuple
>     }
>    [, ...]
>   ){code}
> This is suspicious because {{constant_expression}} is used in the range 
> clause, and {{constant_expression_or_tuple}} is used in the single-value 
> clause.  I believe both should allow for tuples.
> In other words, today a CREATE TABLE statement such as
> {code:java}
> CREATE TABLE t (a BIGINT, b BIGINT, PRIMARY KEY (a, b))
> PARTITION BY RANGE (a, b) (
>     PARTITION (0, 0) <= VALUES < (10, 0)
> ) STORED AS KUDU;{code}
> results in a syntax error, and it should not.  CC [~twmarshall]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org

Reply via email to