You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/02/17 02:11:39 UTC

[GitHub] [iceberg] aokolnychyi commented on a change in pull request #4123: Fix random test failure of testDeleteWithSerializableIsolation

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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org