pvary commented on code in PR #14414:
URL: https://github.com/apache/iceberg/pull/14414#discussion_r2514004990


##########
flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/DynamicCommitter.java:
##########
@@ -211,9 +215,23 @@ private void commitPendingRequests(
           DeltaManifests deltaManifests =
               SimpleVersionedSerialization.readVersionAndDeSerialize(
                   DeltaManifestsSerializer.INSTANCE, 
committable.getCommittable().manifest());
+
+          WriteResult writeResult =
+              FlinkManifestUtil.readCompletedFiles(deltaManifests, table.io(), 
table.specs());
+          if (TableUtil.formatVersion(table) > 2) {
+            for (DeleteFile deleteFile : writeResult.deleteFiles()) {
+              if (deleteFile.content() == FileContent.POSITION_DELETES) {
+                Preconditions.checkArgument(
+                    ContentFileUtil.isDV(deleteFile),
+                    "Dynamic Sink does not support upgrading the underlying 
table version directly for table V2 to V3 when position deletes are 
present.Table is "

Review Comment:
   nit: Something like this?
   ```
                       "Can't add position delete file to the %s table. 
Concurrent table upgrade to V3 is not supported.",
                           table.name());
   ```



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

Reply via email to