[ 
https://issues.apache.org/jira/browse/TRAFODION-2044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15416030#comment-15416030
 ] 

ASF GitHub Bot commented on TRAFODION-2044:
-------------------------------------------

Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/651#discussion_r74332266
  
    --- Diff: core/sql/ustat/hs_cli.cpp ---
    @@ -524,12 +531,14 @@ Lng32 HSSample::create(NAString& tblName, NABoolean 
unpartitioned, NABoolean isP
                tableOptions = " WITH PARTITIONS";
             // If a transaction is running, the table needs to be created as 
audited.
             // Otherwise, create table as non-audited.
    +        /* TEMPTEMP. Dave need to validate this change.
             if (TM->InTransaction())
               tableOptions += " ATTRIBUTE AUDIT";
             else
               tableOptions += " ATTRIBUTE NO AUDIT";
     
             tableOptions += getTempTablePartitionInfo(unpartitioned, 
isPersSample);
    +        */
    --- End diff --
    
    That's fine. Actually, the reason that this code had to be commented out is 
due to a change I made in https://issues.apache.org/jira/browse/TRAFODION-2044. 
Given your experiment, the change looks correct to me now.


> CREATE TABLE LIKE with SALT USING  clause uses source table partition count
> ---------------------------------------------------------------------------
>
>                 Key: TRAFODION-2044
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2044
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-cmu
>    Affects Versions: 2.0-incubating
>         Environment: Trafodion 2.0 environment
>            Reporter: Carol Pearson
>            Assignee: David Wayne Birdsall
>             Fix For: 2.1-incubating
>
>
> Using CREATE TABLE LIKE to create a table, then changing the number of 
> partitions. The resulting new table number of partitions matches the 
> partitioncount for the source table in the CREATE TABLE LIKE statement, 
> rather than the value specified in the command:
> See the following commands:
> >>>create table tsource (c1 int not null, c2 int not null, primary key (c1))
> +>salt using 4 partitions;
> --- SQL operation complete.
> >>create table tsource_like like tsource salt using 8 partitions;
> --- SQL operation complete.
> >>showddl tsource_like
> +>;
> CREATE TABLE TRAFODION.SEABASE.TSOURCE_LIKE
>   (
>     C1                               INT NO DEFAULT NOT NULL NOT DROPPABLE
>       SERIALIZED
>   , C2                               INT NO DEFAULT NOT NULL NOT DROPPABLE
>       SERIALIZED
>   , PRIMARY KEY (C1 ASC)
>   )
>   SALT USING 4 PARTITIONS
> ;
> --- SQL operation complete.
> >>
> But table tsource_like was created using SALT USING 8 PARTITIONS



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

Reply via email to