mihaibudiu commented on code in PR #3883:
URL: https://github.com/apache/calcite/pull/3883#discussion_r1709934375
##########
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) ]
Review Comment:
(1) This grammar does not require parentheses, I think it's more general
this way. We can add them if desired.
(2) The grammar accepts any expression, but the validator will reject
complex expressions, requiring a single comparison
--
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]