Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-8283

Creating a Kudu table doesn't take the primary key order specified

    XMLWordPrintableJSON

Details

    • ghx-label-7

    Description

      Example1:

      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.

      existingtable: (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

       

      Example 2:

      Issue also exists when schema has a different order than the primary key specified.

      Create table newtable2 (a string, b string, c string, d boolean) primary key (b, a , c) partition by hash(a) stored as kudu

      Result: newtable2 has PK order of (a,b,c) instead of specified (b, a, c) and no error is given

      Attachments

        Activity

          People

            tlipcon Todd Lipcon
            bhausmann Brian Hausmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: