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

    https://github.com/apache/incubator-trafodion/pull/333#discussion_r53705620
  
    --- Diff: core/sql/sqlcomp/CmpSeabaseDDLtable.cpp ---
    @@ -356,6 +356,9 @@ void CmpSeabaseDDL::createSeabaseTableLike(
             query += keyClause;
           }
     
    +  // send any user CQDs down 
    +  Lng32 retCode = sendAllControls(FALSE, FALSE, TRUE);
    +
    --- End diff --
    
    I think not. And here is why: If I do the CREATE TABLE LIKE from sqlci, the 
CREATE TABLE LIKE logic executes in the master and the under-the-covers vanilla 
CREATE TABLE executes in a tdm_arkcmp child. In sqlci, any CQD done in the 
master is also done in the child. So, in the sqlci case, the CQDs will be 
identical. As far as I know this has no ill effect. CQDs have an anomaly 
though: They are not propagated more than one level down. UPDATE STATS runs in 
a tdm_arkcmp child of sqlci (or MXOSRVR). The CREATE TABLE LIKE that UPDATE 
STATS executes runs in a tdm_arkcmp child of that process (that is, a 
grandchild of the sqlci). This seems to be intentional: UPDATE STATS wants to 
tightly control what CQDs execute in that process. The under-the-covers vanilla 
CREATE TABLE runs in a tdm_arkcmp child of the one running CREATE TABLE LIKE 
(that is, a great-grandchild of sqlci). UPDATE STATS itself executes a 
controlled set of CQDS; these reach the grandchild tdm_arkcmp (that is, the one 
runni
 ng CREATE TABLE LIKE) but not the great-grandchild. But it is an accident of 
implementation that the vanilla CREATE TABLE runs one more process down. So, 
sending the CQDs down seems harmless (as it works that way from sqlci now) and 
appropriate (as UPDATE STATS has already controlled the CQDs run by the 
grandchild). Apologies for all the words; this would be much clearer if drawn 
in a picture.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to