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

    https://github.com/apache/incubator-quickstep/pull/229#discussion_r110817047
  
    --- Diff: parser/SqlParser.ypp ---
    @@ -1198,23 +1211,49 @@ with_list_element:
         $$->set_table_reference_signature($1);
       };
     
    +set_operation_union:
    +  set_operation_union TOKEN_UNION opt_all_distinct set_operation_intersect 
{
    +    if ($3) {
    +      $$ = new quickstep::ParseSetOperation(@1.first_line, 
@1.first_column, quickstep::ParseSetOperation::kUnion);
    +    } else {
    +      $$ = new quickstep::ParseSetOperation(@1.first_line, 
@1.first_column, quickstep::ParseSetOperation::kUnionAll);
    +    }
    +    $$->addOperand($1);
    +    $$->addOperand($4);
    +  }
    +  | set_operation_intersect {
    +    $$ = $1;
    +  }
    +
    +set_operation_intersect:
    +  set_operation_intersect TOKEN_INTERSECT select_query {
    +    $$ = new quickstep::ParseSetOperation(@1.first_line, @1.first_column, 
quickstep::ParseSetOperation::kIntersect);
    +    quickstep::ParseSetOperation *op = new quickstep::ParseSetOperation(
    +        @3.first_line, @3.first_column, 
quickstep::ParseSetOperation::kSelect);
    +    op->addOperand($3);
    +    $$->addOperand($1);
    +    $$->addOperand(op);
    +  }
    +  | select_query {
    +    $$ = new quickstep::ParseSetOperation(@1.first_line, @1.first_column, 
quickstep::ParseSetOperation::kSelect);
    +    $$->addOperand($1);
    +  }
    +
     select_query:
       TOKEN_SELECT opt_all_distinct selection from_clause opt_where_clause 
opt_group_by_clause opt_having_clause
    --- End diff --
    
    I observed the following warning:
    
    ```
    SqlParser.ypp:1243.16-31: warning: unused value: $2 [-Wother]
       TOKEN_SELECT opt_all_distinct selection from_clause opt_where_clause 
opt_group_by_clause opt_having_clause
                    ^^^^^^^^^^^^^^^^
    ```


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