You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/09/09 06:12:31 UTC

[GitHub] [shardingsphere] xbkaishui commented on a change in pull request #7340: Fix create table if not exists pre validation error

xbkaishui commented on a change in pull request #7340:
URL: https://github.com/apache/shardingsphere/pull/7340#discussion_r485361177



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDDLVisitor.java
##########
@@ -166,7 +166,7 @@ public ASTNode visitRenameTableSpecification(final RenameTableSpecificationConte
     @SuppressWarnings("unchecked")
     @Override
     public ASTNode visitCreateTable(final CreateTableContext ctx) {
-        CreateTableStatement result = new CreateTableStatement((SimpleTableSegment) visit(ctx.tableName()));
+        CreateTableStatement result = new CreateTableStatement((SimpleTableSegment) visit(ctx.tableName()), null != ctx.notExistClause_().EXISTS());

Review comment:
       No,  it will return an Empty notExistClause*Context, it's EXISTS() method will return null 




----------------------------------------------------------------
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:
users@infra.apache.org