[
https://issues.apache.org/jira/browse/KUDU-1792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dan Burkert reassigned KUDU-1792:
---------------------------------
Assignee: Dan Burkert
> 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
> Assignee: Dan Burkert
> Fix For: 1.2.0, 1.1.1
>
>
> 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)