yashmayya commented on code in PR #3883:
URL: https://github.com/apache/calcite/pull/3883#discussion_r2057922563


##########
core/src/main/codegen/templates/Parser.jj:
##########
@@ -2092,13 +2096,32 @@ SqlNode JoinTable(SqlNode e) :
     //
     // We allow CROSS JOIN (joinType = CROSS_JOIN) to have a join condition,
     // even though that is not valid SQL; the validator will catch it.
-    LOOKAHEAD(3)
+    LOOKAHEAD(4)
     natural = Natural()
     joinType = JoinType()
     e2 = TableRef1(ExprContext.ACCEPT_QUERY_OR_JOIN)
     (
+        [ <MATCH_CONDITION> matchCondition = 
Expression(ExprContext.ACCEPT_SUB_QUERY) ]
         <ON> { on = JoinConditionType.ON.symbol(getPos()); }

Review Comment:
   > And you can't just use 'true' either, since it requires an equijoin
   
   Actually, this does seem to work because the `ConjunctionOfEqualities` class 
in `SqlValidatorImpl` doesn't override the literal visit method of `SqlShuttle` 
so `ConjunctionOfEqualities.illegal` retains its default value of false for a 
join condition like `ON true`. 



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to