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

    https://github.com/apache/incubator-trafodion/pull/772#discussion_r85249422
  
    --- Diff: core/sql/arkcmp/CmpStatement.cpp ---
    @@ -1688,3 +1690,26 @@ void CmpStatement::setTMUDFRefusedRequirements(const 
char *details)
     
       detailsOnRefusedRequirements_->insert(new(heap_) NAString(details, 
heap_));
     }
    +
    +void CmpStatement::addCSEInfo(CSEInfo *info)
    +{
    +  if (cses_ == NULL)
    +    cses_ = new(CmpCommon::statementHeap())
    +      LIST(CSEInfo *)(CmpCommon::statementHeap());
    +
    +  info->setCSEId(cses_->entries());
    +  cses_->insert(info);
    +}
    +
    +CSEInfo * CmpStatement::getCSEInfo(const char *cseName)
    +{
    +  if (cses_)
    +    for (CollIndex i=0; i<cses_->entries(); i++)
    +      {
    +        if ((*cses_)[i]->getName() == cseName)
    --- End diff --
    
    As far as I understand, the WITH clause can appear only at the beginning of 
a statement and the names must be unique. The scope of these names extends 
across the entire statement.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to