rubenada commented on code in PR #5370:
URL: https://github.com/apache/calcite/pull/5370#discussion_r4528147364
##########
core/src/main/codegen/templates/Parser.jj:
##########
@@ -4162,15 +4163,37 @@ void AddWithItem(List<SqlWithItem> list, SqlLiteral
recursive) :
final SqlIdentifier id;
final SqlNodeList columnList;
final SqlNode definition;
+ SqlSearchClause search = null;
SqlCycleClause cycle = null;
}
{
id = SimpleIdentifier()
( columnList = ParenthesizedSimpleIdentifierList() | { columnList = null;
} )
<AS>
definition = ParenthesizedExpression(ExprContext.ACCEPT_QUERY)
+ [ search = SearchClause() ]
[ cycle = CycleClause() ]
- { list.add(new SqlWithItem(id.getParserPosition(), id, columnList,
definition, recursive, cycle)); }
+ { list.add(new SqlWithItem(id.getParserPosition(), id, columnList,
definition, recursive,
+ search, cycle)); }
+}
+
+SqlSearchClause SearchClause() :
+{
+ final Span s;
+ final boolean breadthFirst;
Review Comment:
having this as a boolean flag does the trick, but wdyt about symbol literal,
i.e. SqlLiteral.createSymbol with a small enum such as
`SearchMode.DEPTH/BREADTH`? That reads better and leaves room for potential
extension.
--
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]