Showddl output for table with store by clause and index is misleading

Bug #1363132 reported by Suresh Subbiah
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trafodion
New
Low
Suresh Subbiah

Bug Description

The following set of create table/index statements causes showddl to give misleading output.

create table tsys (a int not null, b int) store by (a) salt using 4 partitions ;
create index tsys_ix1 on tsys(b) ;
showddl tsys ;
CREATE TABLE TRAFODION.SEABASE.TSYS
  (
    A INT NO DEFAULT NOT NULL NOT DROPPABLE
  , B INT DEFAULT NULL
  )
  STORE BY (A ASC)
  SALT USING 4 PARTITIONS
;

CREATE INDEX TSYS_IX1 ON TRAFODION.SEABASE.TSYS
  (
    B ASC
  , A ASC
  )
;

--- SQL operation complete.

From showddl output it looks like the user explicitly included column A in the index, while the user actually did not. The actual index does not have an extra column in hbase so we are good.

Creating an index like
CREATE INDEX TSYS_IX2 ON TRAFODION.SEABASE.TSYS
  (
    B ASC
  , A ASC
  )
;
 causes showddl to show two column As in the output

>>showddl tsys ;

CREATE TABLE TRAFODION.SEABASE.TSYS
  (
    A INT NO DEFAULT NOT NULL NOT DROPPABLE
  , B INT DEFAULT NULL
  )
  STORE BY (A ASC)
  SALT USING 4 PARTITIONS
;

CREATE INDEX TSYS_IX1 ON TRAFODION.SEABASE.TSYS
  (
    B ASC
  , A ASC
  )
;

CREATE INDEX TSYS_IX2 ON TRAFODION.SEABASE.TSYS
  (
    B ASC
  , A ASC
  , A ASC
  )
;

Tags: sql-cmu
tags: added: sql-cmu
Paul Low (paul-low-x)
Changed in trafodion:
milestone: r1.0 → none
Paul Low (paul-low-x)
Changed in trafodion:
milestone: none → r1.1
Paul Low (paul-low-x)
Changed in trafodion:
milestone: r1.1 → r1.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.