You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/03/08 04:33:16 UTC

[GitHub] [calcite] zinking commented on a change in pull request #1041: [CALCITE-2847] Optimize global LOOKAHEAD for SQL parsers

zinking commented on a change in pull request #1041: [CALCITE-2847] Optimize global LOOKAHEAD for SQL parsers
URL: https://github.com/apache/calcite/pull/1041#discussion_r263662652
 
 

 ##########
 File path: core/src/main/codegen/templates/Parser.jj
 ##########
 @@ -1698,94 +1700,97 @@ SqlNode FromClause() :
 {
     e = TableRef()
     (
-        // Decide whether to read a JOIN clause or a comma, or to quit having
-        // seen a single entry FROM clause like 'FROM emps'. See comments
-        // elsewhere regarding <COMMA> lookahead.
         LOOKAHEAD(2)
-        natural = Natural()
-        joinType = JoinType()
-        e2 = TableRef()
         (
-            <ON> {
-                joinConditionType = JoinConditionType.ON.symbol(getPos());
-            }
-            condition = Expression(ExprContext.ACCEPT_SUB_QUERY) {
+            // Decide whether to read a JOIN clause or a comma, or to quit having
+            // seen a single entry FROM clause like 'FROM emps'. See comments
+            // elsewhere regarding <COMMA> lookahead.
+            LOOKAHEAD(3)
 
 Review comment:
   so locally, even look ahead  3 is allowed ?  if that's the case then indeed the global flag is meaningless

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services