talatuyarer commented on code in PR #17874:
URL: https://github.com/apache/iceberg/pull/17874#discussion_r4084122089
##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java:
##########
@@ -742,7 +842,19 @@ public void alterTable(
boolean ignoreIfNotExists)
throws TableNotExistException, CatalogException {
if (newTable instanceof CatalogView) {
- throw new UnsupportedOperationException("Altering a view is not
supported.");
+ if (asViewCatalog == null) {
+ throw new UnsupportedOperationException(
+ "Altering a view is not supported by catalog: " + getName());
+ }
+
+ Preconditions.checkArgument(
+ newTable instanceof ResolvedCatalogView,
+ "Expected a ResolvedCatalogView but got: %s",
+ newTable.getClass().getName());
+ // newTable already reflects the fully altered definition, so the
changes need not be
+ // replayed individually
+ alterIcebergView(tablePath, (ResolvedCatalogView) newTable,
ignoreIfNotExists);
Review Comment:
Done
##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java:
##########
@@ -676,7 +775,8 @@ private static void validateTablePartition(CatalogTable
ct1, CatalogTable ct2) {
public void alterTable(ObjectPath tablePath, CatalogBaseTable newTable,
boolean ignoreIfNotExists)
Review Comment:
Updated
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]