trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaveBirdsall <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #577: [TRAFODION-1673] support with clause
Date Tue, 12 Jul 2016 19:26:39 GMT
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/577#discussion_r70505167
  
    --- Diff: core/sql/parser/sqlparser.y ---
    @@ -7001,6 +7036,46 @@ rel_subquery_and_as_clause : rel_subquery as_clause
                                    $$ = $2;
                                  }
     
    +with_clause_list : with_clause
    +                     {  $$ = $1 ; }
    +
    +                   | with_clause_list ',' correlation_name TOK_AS rel_subquery 
    --- End diff --
    
    One way would be:
    
    with_clause : WITH with_clause_elements
    
    with_clause_elements : with_clause element
                                      |
                                         with_clause_elements with_clause_element
    
    with_clause_element : correlation_name TOK_AS rel_subquery
    
    By the way, I notice the way this is coded, the "with_clause" non-terminal is a single
correlation_name TOK_AS rel_subquery element. It seems more natural (to me anyway) to think
of the with_clause as being everything from the WITH keyword through the entire list of subqueries.


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

Mime
View raw message