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 06:30:49 UTC

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

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

 ##########
 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:
   Thanks zinking, I'm sure there are some `LOOKAHEAD(3)`s should be added but not this one -- here we can just use 2 to avoid the choice conflict between `CROSS APPLY` and `CROSS JOIN`, so it was by my mistake.

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