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