You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "talatuyarer (via GitHub)" <gi...@apache.org> on 2026/09/23 03:20:48 UTC

Re: [PR] Flink: Support ALTER VIEW in FlinkCatalog [iceberg]

talatuyarer commented on code in PR #17874:
URL: https://github.com/apache/iceberg/pull/17874#discussion_r4078752076


##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java:
##########
@@ -641,6 +662,56 @@ private void createIcebergView(
     }
   }
 
+  private void alterIcebergView(
+      ObjectPath tablePath, ResolvedCatalogView newView, boolean ignoreIfNotExists)
+      throws TableNotExistException, CatalogException {
+    View view;
+    try {
+      view = asViewCatalog.loadView(toIdentifier(tablePath));
+    } catch (NoSuchViewException e) {
+      if (!ignoreIfNotExists) {
+        throw new TableNotExistException(getName(), tablePath, e);
+      }
+
+      return;
+    }
+
+    SQLViewRepresentation currentRepresentation = view.sqlFor(FLINK_DIALECT);
+    if (currentRepresentation == null

Review Comment:
   Good point! implemented as an upsert: ALTER VIEW AS now replaces the flink representation and carries other engines' dialects over unchanged, so altering a spark-only view adds a flink representation next to it. 



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org