macroguo-ghy commented on code in PR #3442:
URL: https://github.com/apache/calcite/pull/3442#discussion_r1349640383
##########
server/src/main/codegen/includes/parserImpls.ftl:
##########
@@ -247,14 +247,73 @@ SqlCreate SqlCreateTable(Span s, boolean replace) :
final SqlIdentifier id;
SqlNodeList tableElementList = null;
SqlNode query = null;
+
+ SqlCreate createTableLike = null;
}
{
<TABLE> ifNotExists = IfNotExistsOpt() id = CompoundIdentifier()
- [ tableElementList = TableElementList() ]
- [ <AS> query = OrderedQueryOrExpr(ExprContext.ACCEPT_QUERY) ]
+ (
+ <LIKE> createTableLike = SqlCreateTableLike(s, replace, ifNotExists,
id) {
+ return createTableLike;
+ }
+ |
+ [ tableElementList = TableElementList() ]
+ [ <AS> query = OrderedQueryOrExpr(ExprContext.ACCEPT_QUERY) ]
+ {
+ return SqlDdlNodes.createTable(s.end(this), replace, ifNotExists,
id, tableElementList, query);
+ }
+ )
+}
+
+SqlCreate SqlCreateTableLike(Span s, boolean replace, boolean ifNotExists,
SqlIdentifier id) :
Review Comment:
Fix this. Could you please review this PR again?
--
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]