You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Anoop Sharma (JIRA)" <ji...@apache.org> on 2015/07/14 06:42:04 UTC

[jira] [Created] (TRAFODION-36) showddl does not show delimited names in ON subclause of SALT clause

Anoop Sharma created TRAFODION-36:
-------------------------------------

             Summary: showddl does not show delimited names in ON subclause of SALT clause
                 Key: TRAFODION-36
                 URL: https://issues.apache.org/jira/browse/TRAFODION-36
             Project: Apache Trafodion
          Issue Type: Bug
            Reporter: Anoop Sharma


showddl command shows details about a table. Generated
create statement could be used to recreate the table.
It currently does not put double quotes around columns in
the ON clause of SALT expression.
That results in CREATE LIKE, which internally uses showddl output,
to fail if the specified column name is invalid without quotes.

Here is an example to reproduce this issue:

>>create table t ("a.a" int not null, b int not null, primary key("a.a", b))
+>salt using 4 partitions on ("a.a");

--- SQL operation complete.
>>showddl t;

CREATE TABLE TRAFODION.SEABASE.T
  (
    "a.a"                            INT NO DEFAULT NOT NULL NOT DROPPABLE
  , B                                INT NO DEFAULT NOT NULL NOT DROPPABLE
  , PRIMARY KEY ("a.a" ASC, B ASC)
  )
  SALT USING 4 PARTITIONS
       ON (a.a)
;

--- SQL operation complete.
>>create table tt like t;

*** ERROR[15001] A syntax error occurred at or before: 
create table TRAFODION.SEABASE.TT    (     "a.a"                            INT
 NO DEFAULT NOT NULL NOT DROPPABLE NOT
      SERIALIZED  , "B"                              INT NO DEFAULT NOT NULL NO
T DROPPABLE NOT
      SERIALIZED  , PRIMARY KEY ("a.a" ASC, B ASC)  )  SALT USING 4 PARTITIONS 
      ON (a.a);
           ^ (304 characters from start of SQL statement)

*** ERROR[8822] The statement was not prepared.

--- SQL operation failed with errors.
>>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)