xtern commented on code in PR #1385:
URL: https://github.com/apache/ignite-3/pull/1385#discussion_r1036892970


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ddl/DdlCommandHandler.java:
##########
@@ -197,17 +238,17 @@ private CompletableFuture<Boolean> 
handleAlterDropColumn(AlterTableDropCommand c
         }
 
         return dropColumnInternal(cmd.tableName(), cmd.columns(), 
cmd.ifColumnExists())
-                .handle(handleTableModificationResult(cmd.ifTableExists()));
+                .handle(handleModificationResult(cmd.ifTableExists(), 
TableNotFoundException.class));
     }
 
-    private static BiFunction<Object, Throwable, Boolean> 
handleTableModificationResult(boolean ignoreTableExistenceErrors) {
+    private static BiFunction<Object, Throwable, Boolean> 
handleModificationResult(boolean ignoreExpectedError, Class<?> expErrCls) {
         return (val, err) -> {
             if (err == null) {
                 return val instanceof Boolean ? (Boolean) val : Boolean.TRUE;
-            } else if (ignoreTableExistenceErrors) {
+            } else if (ignoreExpectedError) {
                 Throwable err0 = err instanceof CompletionException ? 
err.getCause() : err;
 
-                if (err0 instanceof TableAlreadyExistsException || err0 
instanceof TableNotFoundException) {
+                if (expErrCls.isInstance(err0)) {

Review Comment:
   Fixed, thanks.



-- 
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]

Reply via email to