xtern commented on code in PR #2119:
URL: https://github.com/apache/ignite-3/pull/2119#discussion_r1212108259
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ddl/DdlCommandHandlerWrapper.java:
##########
@@ -70,6 +73,21 @@ public CompletableFuture<Boolean> handle(DdlCommand cmd) {
.thenCompose(res ->
catalogManager.dropTable(DdlToCatalogCommandConverter.convert((DropTableCommand)
cmd))
.handle(handleModificationResult(((DropTableCommand) cmd).ifTableExists(),
TableNotFoundException.class))
);
+ } else if (cmd instanceof AlterTableAddCommand) {
+ AlterTableAddCommand addCommand = (AlterTableAddCommand) cmd;
+
+ return ddlCommandFuture
+ .thenCompose(res ->
catalogManager.addColumn(DdlToCatalogCommandConverter.convert(addCommand))
+
.handle(handleModificationResult(addCommand.ifTableExists(),
TableNotFoundException.class))
+ );
+ } else if (cmd instanceof AlterTableDropCommand) {
+ AlterTableDropCommand dropCommand = (AlterTableDropCommand) cmd;
+
+ return ddlCommandFuture
+ .thenCompose(res ->
catalogManager.dropColumn(DdlToCatalogCommandConverter.convert(dropCommand))
+
.handle(handleModificationResult(dropCommand.ifTableExists(),
TableNotFoundException.class))
+
.handle(handleModificationResult(dropCommand.ifColumnExists(),
ColumnNotFoundException.class))
Review Comment:
Should `ifColumnExists` also be ignored for `DROP COLUMN`?
--
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]