shangxinli commented on code in PR #14197:
URL: https://github.com/apache/iceberg/pull/14197#discussion_r2386030651


##########
flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/sink/BaseDeltaTaskWriter.java:
##########
@@ -110,7 +113,7 @@ public void write(RowData row) throws IOException {
 
   protected class RowDataDeltaWriter extends BaseEqualityDeltaWriter {
     RowDataDeltaWriter(PartitionKey partition) {
-      super(partition, schema, deleteSchema, DeleteGranularity.FILE);
+      super(partition, schema, deleteSchema, DeleteGranularity.FILE, useDv);

Review Comment:
   if 'useDv' is true, do we require 'DeleteGranularity.FILE != null'? 
   If yes, can we add Preconditions.checkState(DeleteGranularity.FILE != null, 
"DV support requires specific delete granularity configuration");



##########
flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/DynamicWriter.java:
##########
@@ -116,6 +117,11 @@ public void write(DynamicRecordInternal element, Context 
context)
                           Preconditions.checkState(
                               !equalityFieldIds.isEmpty(),
                               "Equality field columns shouldn't be empty when 
configuring to use UPSERT data.");
+
+                          Preconditions.checkArgument(
+                              !(TableUtil.formatVersion(table) > 2),
+                              "Dynamic Sink writer does not support upsert 
mode in tables (V3+)");

Review Comment:
   Maybe put a little more information, e.g. "Dynamic Sink writer does not 
currently support upsert mode with deletion vectors in V3+ tables. Use append 
mode or configure the table to use position delete files."?



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