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

    https://github.com/apache/trafodion/pull/1688#discussion_r221816282
  
    --- Diff: core/sql/parser/sqlparser.y ---
    @@ -13280,13 +13288,130 @@ table_expression : from_clause where_clause 
sample_clause
                                                 
SqlParser_CurrentParser->topHasOlapFunctions());
                          SqlParser_CurrentParser->setTopHasTDFunctions(FALSE);
                   }
    +            | from_clause startwith_clause where_clause 
    +                   {
    +                     if($1->getOperatorType() == REL_JOIN)
    --- End diff --
    
    I am confused on several aspects here. None maybe issues
    
    1) In line 13297 the WHERE clause is passed but not in line 13310. IF 
branch is taken if we have a Join. Why would the WHERE clause not be passed in 
for a single scan? Is it because it is already addressed in the preceding rule. 
If yes, what benefit do lines 13308 to 13318 provide?
    
    2) Are OLAP functions in the select list supported? Should sequence 
functions be supported too (since they are similar)?
    
    3) I wonder if this whole block of code could be expressed more concisely. 
There seems to be some redundancy now.


---

Reply via email to