tristaZero commented on a change in pull request #4123: Add MySQL DDLStatement
antlr visitor
URL:
https://github.com/apache/incubator-shardingsphere/pull/4123#discussion_r373778674
##########
File path:
shardingsphere-sql-parser/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/MySQLVisitor.java
##########
@@ -190,6 +227,135 @@ public ASTNode visitCreateUser(final CreateUserContext
ctx) {
}
// DDLStatement.g4
+ @Override
+ public ASTNode visitCreateTable(final CreateTableContext ctx) {
+ CreateTableStatement result = new CreateTableStatement();
+ TableSegment table = (TableSegment) visit(ctx.tableName());
+ result.setTable(table);
+ result.getAllSQLSegments().add(table);
+ CreateDefinitionClause_Context createDefinitionClause =
ctx.createDefinitionClause_();
+ if (null != createDefinitionClause) {
Review comment:
@SteNicholas Could get `ListValue<ColumnDefinitionSegment>` from
`visitCreateDefinitionClause()` and add it to `columnDefinitions` in
`CreateTableStatement`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services