danny0405 commented on a change in pull request #2696:
URL: https://github.com/apache/calcite/pull/2696#discussion_r800439312
##########
File path: core/src/main/codegen/templates/Parser.jj
##########
@@ -2173,10 +2176,23 @@ SqlNode TableRef2(boolean lateral) :
<TABLE> { s = span(); } <LPAREN>
tableRef = TableFunctionCall(s.pos())
<RPAREN>
+ [
+ <HINT_BEG>
+ CommaSeparatedSqlHints(hints)
+ <COMMENT_END>
+ ]
{
if (lateral) {
- tableRef = SqlStdOperatorTable.LATERAL.createCall(
- s.end(this), tableRef);
+ if (hints.size() > 0) {
+ hintList = new SqlNodeList(hints,
s.addAll(hints).end(this));
+ SqlNode tmpTableRef =
SqlStdOperatorTable.LATERAL.createCall(
+ s.end(this), tableRef);
Review comment:
I feel it is more reasonable to include the `tableRef` into the
`LATERAL` call not the other way around, say we should change the lateral call
to support `tableRef` as the table reference, WDYT ?
--
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]