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/05/11 21:16:15 UTC

[GitHub] [calcite] MGelbana commented on a change in pull request #1204: [CALCITE-35] Parse parenthesized joins

MGelbana commented on a change in pull request #1204: [CALCITE-35] Parse parenthesized joins
URL: https://github.com/apache/calcite/pull/1204#discussion_r283111720
 
 

 ##########
 File path: core/src/main/codegen/templates/Parser.jj
 ##########
 @@ -665,23 +665,33 @@ SqlNode LeafQuery(ExprContext exprContext) :
  */
 SqlNode ParenthesizedExpression(ExprContext exprContext) :
 {
-    SqlNode e;
+    SqlNode e, left;
 }
 {
     <LPAREN>
-    {
-        // we've now seen left paren, so queries inside should
-        // be allowed as sub-queries
-        switch (exprContext) {
-        case ACCEPT_SUB_QUERY:
-            exprContext = ExprContext.ACCEPT_NONCURSOR;
-            break;
-        case ACCEPT_CURSOR:
-            exprContext = ExprContext.ACCEPT_ALL;
-            break;
-        }
-    }
-    e = OrderedQueryOrExpr(exprContext)
+    (
+        LOOKAHEAD(3)
 
 Review comment:
   It breaks (after adding a necessary alias for the subquery). I made further changes and will push them soon inshallah.

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