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

    https://github.com/apache/incubator-trafodion/pull/577#discussion_r71058095
  
    --- Diff: core/sql/parser/sqlparser.y ---
    @@ -13333,14 +13396,41 @@ query_specification : select_token set_quantifier 
query_spec_body
                                   ColReference(new (PARSERHEAP()) 
ColRefName(TRUE, PARSERHEAP()))
                                             )
                              );
    -      assert($3->getOperatorType() == REL_ROOT);
    +           assert($3->getOperatorType() == REL_ROOT);
    +           RelRoot *root1 = (RelRoot *) $$;
    +           RelRoot *root2 = (RelRoot *) $3;
    +           root1->assignmentStTree() = root2->assignmentStTree();
    +           root2->assignmentStTree() = NULL;
    +           }
    +       else
    +         $$ = $3;
    +
    +       if (CmpCommon::getDefault(MVQR_LOG_QUERY_DESCRIPTORS) == DF_DUMP ||
    +           CmpCommon::getDefault(MVQR_LOG_QUERY_DESCRIPTORS) == DF_DUMP_MV)
    +         ((RelRoot*)$$)->setAnalyzeOnly();
    +
    +    }
    +
    +/* type relx */
    +query_specification :with_clause select_token set_quantifier 
query_spec_body 
    +     {
    +       if ($3) {
    +         $$ = new (PARSERHEAP())
    +           RelRoot(new (PARSERHEAP())
    +                   GroupByAgg($4
    --- End diff --
    
    if ($3) means there is a set_quantifier token, which is DISTINCT for 
example, so need a GroupByAgg node here.


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