AMashenkov commented on code in PR #2105:
URL: https://github.com/apache/ignite-3/pull/2105#discussion_r1211510984
##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogServiceImpl.java:
##########
@@ -214,6 +222,57 @@ public CompletableFuture<Void>
dropColumn(AlterTableDropColumnParams params) {
return failedFuture(new UnsupportedOperationException("Not implemented
yet."));
}
+ /** {@inheritDoc} */
+ @Override
+ public CompletableFuture<Void> alterColumn(AlterColumnParams params) {
+ return saveUpdate(catalog -> {
+ String schemaName =
Objects.requireNonNullElse(params.schemaName(), CatalogService.PUBLIC);
+
+ SchemaDescriptor schema =
Objects.requireNonNull(catalog.schema(schemaName), "No schema found: " +
schemaName);
+
+ TableDescriptor table = schema.table(params.tableName());
+
+ if (table == null) {
+ if (params.ifTableExists()) {
+ return Collections.emptyList();
+ }
Review Comment:
"CREATE TABLE IF EXISTS" always throws an exception in such case.
@korlov42 , did you agreed passing 'if exists' flags inside the parameters?
--
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]