bug fixed for sql parser.

This commit is contained in:
wenshao
2017-09-04 14:40:40 +08:00
parent 5ab33e0566
commit 9990e07aaa
3 changed files with 13 additions and 5 deletions
@@ -2367,12 +2367,12 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
}
public boolean visit(SQLCreateTableStatement x) {
printCreateTable(x);
printCreateTable(x, true);
return false;
}
protected void printCreateTable(SQLCreateTableStatement x) {
protected void printCreateTable(SQLCreateTableStatement x, boolean printSelect) {
print0(ucase ? "CREATE " : "create ");
final SQLCreateTableStatement.Type tableType = x.getType();
@@ -2394,7 +2394,7 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
}
SQLSelect select = x.getSelect();
if (select != null) {
if (printSelect && select != null) {
println();
print0(ucase ? "AS" : "as");