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

Brian Hausmann updated IMPALA-8283:
-----------------------------------
    Description: 
When trying to create a new Kudu table from an existing Kudu table with a 
different primary key order, Impala takes the primary key structure from the 
existing Kudu Table instead of the new key order specified in the create table 
statement.

 

Example:

table1: (a string, b string, c string, d boolean) primary key (a, b, c) 
partition by hash (a) stored as kudu

 
{code:java}
create table newtable primary key (b, a, c) partition by hash (a) stored as 
kudu as Select * from table1
{code}
 

 

Result: newtable is created with the same primary key order (a, b, c) as table1 
instead of specified (b, a, c) order

 

The workaround for this was to create an empty table with the correct key 
structure and field order and then insert the data into the table

  was:
When trying to create a new Kudu table from an existing Kudu table with a 
different primary key order, Impala takes the primary key structure from the 
existing Kudu Table instead of the new key order specified in the create table 
statement.

 

Example:

table1: (a string, b string, c string, d boolean) primary key (a, b, c) 
partition by hash (a) stored as kudu

create table newtable primary key (b, a, c) partition by hash (a) stored as 
kudu as Select * from table1

 

Result: newtable is created with the same primary key order (a, b, c) as table1 
instead of specified (b, a, c) order

 

The workaround for this was to create an empty table with the correct key 
structure and field order and then insert the data into the table


> Creating a Kudu table from an existing Kudu table doesn't take the primary 
> key order specified
> ----------------------------------------------------------------------------------------------
>
>                 Key: IMPALA-8283
>                 URL: https://issues.apache.org/jira/browse/IMPALA-8283
>             Project: IMPALA
>          Issue Type: Bug
>            Reporter: Brian Hausmann
>            Priority: Major
>              Labels: impala, impala-kudu, kudu
>
> When trying to create a new Kudu table from an existing Kudu table with a 
> different primary key order, Impala takes the primary key structure from the 
> existing Kudu Table instead of the new key order specified in the create 
> table statement.
>  
> Example:
> table1: (a string, b string, c string, d boolean) primary key (a, b, c) 
> partition by hash (a) stored as kudu
>  
> {code:java}
> create table newtable primary key (b, a, c) partition by hash (a) stored as 
> kudu as Select * from table1
> {code}
>  
>  
> Result: newtable is created with the same primary key order (a, b, c) as 
> table1 instead of specified (b, a, c) order
>  
> The workaround for this was to create an empty table with the correct key 
> structure and field order and then insert the data into the table



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to