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

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

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.


> enhance Trafodion implementation of WITH clause
> -----------------------------------------------
>
>                 Key: TRAFODION-2127
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2127
>             Project: Apache Trafodion
>          Issue Type: Improvement
>            Reporter: liu ming
>            Assignee: Hans Zeller
>
> TRAFODION-1673 described some details about how to support WITH clause in 
> Trafodion.
> As initial implementation, we use a simple pure-parser method.
> That way, Trafodion can support WITH clause functionally, but not good from 
> performance point of view,
> also need to enhance the parser to be more strict in syntax.
> This JIRA is a follow up JIRA, to track following effort to support Trafodion 
> WITH clause.



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

Reply via email to