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

    https://github.com/apache/incubator-trafodion/pull/577#discussion_r71197264
  
    --- Diff: core/sql/parser/sqlparser.y ---
    @@ -6647,15 +6651,26 @@ table_as_tmudf_function : TOK_UDF '(' 
table_mapping_function_invocation ')'
     
     table_name_and_hint : table_name optimizer_hint hbase_access_options
                           {
    -                        $$ = new (PARSERHEAP()) Scan(*$1);
    -                        if ($2) 
    -                          $$->setHint($2);
    +                        NAString tmp = ((*$1).getQualifiedNameAsString());
    +                        
if(SqlParser_CurrentParser->hasWithDefinition(&tmp) )
    +                        {
    +                          RelExpr *re = 
SqlParser_CurrentParser->getWithDefinition(&tmp);
    +                          $$=re->copyTree(PARSERHEAP());
    +                          delete $1;
    --- End diff --
    
    One thing we could do here is to raise an error if we have an optimizer 
hint or HBase access options at this point. Those are allowed in the grammar, 
but we wouldn't be able to apply them to a more complicated WITH 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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to