You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kudu.apache.org by "Dan Burkert (JIRA)" <ji...@apache.org> on 2016/12/07 04:04:58 UTC

[jira] [Updated] (KUDU-1792) It is possible to overwrite range partitions with new ones

     [ https://issues.apache.org/jira/browse/KUDU-1792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Burkert updated KUDU-1792:
------------------------------
    Status: In Review  (was: Open)

> It is possible to overwrite range partitions with new ones
> ----------------------------------------------------------
>
>                 Key: KUDU-1792
>                 URL: https://issues.apache.org/jira/browse/KUDU-1792
>             Project: Kudu
>          Issue Type: Bug
>            Reporter: Lars Volker
>
> In a table with open ended partitions it is possible to overwrite the one at the upper end with a partition that matches its boundary element.
> Here's the output of how to repro this. The {{show range partitions}} command has not been merged into the Impala codebase, but it reflects the output of the {{getFormattedRangePartitions()}} API call.
> {noformat}
> [localhost:21000] > create table lt (id int primary key, name string null, vali bigint not null)
>   distribute by range (id) (partition 1 < values <= 10) stored as kudu
>   tblproperties('kudu.table_name'='lt');
> Query: create table lt (id int primary key, name string null, vali bigint not null)
>   distribute by range (id) (partition 1 < values <= 10) stored as kudu
>   tblproperties('kudu.table_name'='lt')
> Fetched 0 row(s) in 0.24s
> [localhost:21000] > show range partitions lt;
> Query: show range partitions lt
> +---------------------+
> | Partition Specifier |
> +---------------------+
> | 2 <= VALUES < 11    |
> +---------------------+
> Fetched 1 row(s) in 4.27s
> [localhost:21000] > alter table lt add range partition values < 2;
> Query: alter table lt add range partition values < 2
> Fetched 0 row(s) in 0.22s
> [localhost:21000] > show range partitions lt;
> Query: show range partitions lt
> +---------------------+
> | Partition Specifier |
> +---------------------+
> | VALUES < 2          |
> | 2 <= VALUES < 11    |
> +---------------------+
> Fetched 2 row(s) in 0.01s
> [localhost:21000] > alter table lt add range partition 11 <= values;
> Query: alter table lt add range partition 11 <= values
> Fetched 0 row(s) in 0.44s
> [localhost:21000] > alter table lt add range partition 11 <= values < 16;
> Query: alter table lt add range partition 11 <= values < 16
> Fetched 0 row(s) in 0.56s
> [localhost:21000] > show range partitions lt;
> Query: show range partitions lt
> +---------------------+
> | Partition Specifier |
> +---------------------+
> | VALUES < 2          |
> | 2 <= VALUES < 11    |
> | 11 <= VALUES < 16   |
> +---------------------+
> Fetched 3 row(s) in 0.01s
> {noformat}



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