snuyanzin commented on code in PR #28276:
URL: https://github.com/apache/flink/pull/28276#discussion_r3323552957
##########
flink-table/flink-sql-parser/src/main/codegen/templates/Parser.jj:
##########
@@ -2236,6 +2236,16 @@ SqlNode TableRef3(ExprContext exprContext, boolean
lateral) :
{
tableRef = unnestOp.createCall(s.end(this), (List<SqlNode>) args);
}
+ |
+ // LATERAL with implicit table function call syntax,
+ // e.g. "FROM t, LATERAL fn(...)" instead of "FROM t, LATERAL
TABLE(fn(...))".
+ // The non-LATERAL implicit form is handled by the
CompoundTableIdentifier
+ // branch above.
+ LOOKAHEAD(2)
+ <LATERAL> { lateral = true; }
+ tableName = CompoundTableIdentifier()
+ tableRef = ImplicitTableFunctionCallArgs(tableName)
+ tableRef = addLateral(tableRef, lateral)
Review Comment:
this is the Calcite file from
https://github.com/apache/calcite/blob/main/core/src/main/codegen/templates/Parser.jj
The only reason we have it here is a number of backports from Calcite.
In case we need to make changes here: ideally first need to make them in
Calcite and then backport here
--
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]