pvary commented on code in PR #17874:
URL: https://github.com/apache/iceberg/pull/17874#discussion_r4092933985
##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java:
##########
@@ -658,25 +754,30 @@ private static void validateTablePartition(CatalogTable
ct1, CatalogTable ct2) {
}
/**
- * This alterTable API only supports altering table properties.
+ * For tables, this alterTable API only supports altering table properties.
*
* <p>Support for adding/removing/renaming columns cannot be done by
comparing CatalogTable
* instances, unless the Flink schema contains Iceberg column IDs.
*
* <p>To alter columns, use the other alterTable API and provide a list of
TableChange's.
*
+ * <p>For views, a changed query replaces the current version of the backing
Iceberg view (only
+ * the flink dialect is stored) and property changes are applied following
{@code
+ * Catalog#alterTable} semantics: absent keys are removed.
Review Comment:
I thought quite a bit about this:
- For Spark - API uses changesets, not new target version
- For Flink Tables - we have a single transaction to update the full table
data
- For Flink Views - we don't have an Iceberg api to set everything
additionally at the same time
The good long term solution is probably to add transactions to views too,
but we need to discuss this with the community, and probably we would like to
have more use-cases for it before we go down that road.
The least bad solution is to go back to your previous version where we use 2
changes to update version first, then properties in a second. No problem for
Flink SQL - not reachable ATM, only issue for direct catalog calls, and likely
the least disruptive.
--
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]