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

    https://github.com/apache/incubator-quickstep/pull/35#discussion_r67582107
  
    --- Diff: parser/SqlParser.ypp ---
    @@ -1332,6 +1369,83 @@ opt_limit_clause:
         }
       }
     
    +opt_window_clause:
    +  {
    +    $$ = nullptr;
    +  }
    +  | window_declaration_list
    +
    +window_declaration_list:
    +  window_declaration {
    +    $$ = new quickstep::PtrList<quickstep::ParseWindow>();
    +    $$->push_back($1);
    +  }
    +  | window_declaration_list window_declaration {
    +    $$ = $1;
    +    $$->push_back($2);
    +  }
    +
    +window_declaration:
    --- End diff --
    
    I think currently `SqlParser.hpp` is mostly organized in this way:
    ```
    A:
      TOKEN_X SubA1 SubA2
      ...
      ;
    
    SubA1:
      TOKEN_Y SubSubA1 SubSubA2
      ...
      ;
    
    SubSubA1:
      ...
      ;
    
    ...
    
    SubA2:
      ...
      ;
    ```
    I.e. kind of infix-order traversal of the grammar tree.
    
    Let's just have this PR in this structure. We can have a standalone PR if 
there is a proposal for better organization of the grammar rules.


---
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