Skip to content

Commit

Permalink
alter/drop add if exist flag
Browse files Browse the repository at this point in the history
  • Loading branch information
junwen12221 committed May 12, 2022
1 parent cd20926 commit 17d839f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ protected Future<Void> onExecute(SQLRequest<SQLAlterTableStatement> request, Myc
public Future<Void> get() {
try {
SQLAlterTableStatement sqlAlterTableStatement = request.getAst();
sqlAlterTableStatement.setIfExists(true);
SQLExprTableSource tableSource = sqlAlterTableStatement.getTableSource();
resolveSQLExprTableSource(tableSource, dataContext);
String schema = SQLUtils.normalize(sqlAlterTableStatement.getSchema());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ protected Future<Void> onExecute(SQLRequest<SQLDropTableStatement> request, Myca
public Future<Void> get() {
try {
SQLDropTableStatement ast = request.getAst();
ast.setIfExists(true);
List<SQLExprTableSource> tableSources = ast.getTableSources();
if (tableSources.size() != 1) {
throw new UnsupportedOperationException("unsupported drop multi table :" + tableSources.get(0));
Expand Down

0 comments on commit 17d839f

Please sign in to comment.