Showddl output for table with store by clause and index is misleading
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.
(
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.
(
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.
(
B ASC
, A ASC
)
;
causes showddl to show two column As in the output
>>showddl tsys ;
CREATE TABLE TRAFODION.
(
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.
(
B ASC
, A ASC
)
;
CREATE INDEX TSYS_IX2 ON TRAFODION.
(
B ASC
, A ASC
, A ASC
)
;
tags: | added: sql-cmu |
Changed in trafodion: | |
milestone: | r1.0 → none |
Changed in trafodion: | |
milestone: | none → r1.1 |
Changed in trafodion: | |
milestone: | r1.1 → r1.2 |