Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-36

showddl does not show delimited names in ON subclause of SALT clause

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.2-incubating
    • sql-general
    • None

    Description

      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.
      >>

      Attachments

        Activity

          People

            anoopsharma Anoop Sharma
            anoopsharma Anoop Sharma
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: