[
https://issues.apache.org/jira/browse/TRAFODION-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14714430#comment-14714430
]
Suresh Subbiah commented on TRAFODION-591:
------------------------------------------
>>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 ;
--- SQL operation complete.
>>
--- SQL operation complete.
>>
CREATE TABLE TRAFODION.SCH.TSYS
(
A INT NO DEFAULT NOT NULL NOT DROPPABLE
SERIALIZED
, B INT DEFAULT NULL SERIALIZED
)
STORE BY (A ASC)
SALT USING 4 PARTITIONS
;
CREATE INDEX TSYS_IX1 ON TRAFODION.SCH.TSYS
(
B ASC
)
;
-- GRANT SELECT, INSERT, DELETE, UPDATE, REFERENCES ON TRAFODION.SCH.TSYS TO
DB__ROOT WITH GRANT OPTION;
--- SQL operation complete.
Problem has been resolved.
> LP Bug: 1363132 - Showddl output for table with store by clause and index is
> misleading
> ---------------------------------------------------------------------------------------
>
> Key: TRAFODION-591
> URL: https://issues.apache.org/jira/browse/TRAFODION-591
> Project: Apache Trafodion
> Issue Type: Bug
> Components: sql-cmu
> Reporter: Suresh Subbiah
> Assignee: Suresh Subbiah
> Priority: Minor
> Fix For: 1.0 (pre-incubation)
>
>
> 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
> )
> ;
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)