aokolnychyi commented on a change in pull request #4123:
URL: https://github.com/apache/iceberg/pull/4123#discussion_r808609535



##########
File path: 
spark/v3.0/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestDelete.java
##########
@@ -593,6 +593,17 @@ public synchronized void 
testDeleteWithSerializableIsolation() throws Interrupte
 
     sql("ALTER TABLE %s SET TBLPROPERTIES('%s' '%s')", tableName, 
DELETE_ISOLATION_LEVEL, "serializable");
 
+    // Pre-populate the table to force it to use the DeltaWriter instead of 
Metadata-Only Delete

Review comment:
       nit: what about pulling the existing `inputDF` out of the closure and 
reusing it here?
   
   ```
       List<Integer> ids = ImmutableList.of(1, 2);
       Dataset<Row> inputDF = spark.createDataset(ids, Encoders.INT())
           .withColumnRenamed("value", "id")
           .withColumn("dep", lit("hr"));
   
       // pre-populate the table to avoid metadata deletes
       inputDF.coalesce(1).writeTo(tableName).append();
   
       // existing futures
   ```
   
   We also have to slightly change the error message as `TestDelete` is shared 
between copy-on-write and merge-on-read implementations. Hence, we may not use 
`DeltaWriter`.




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