RussellSpitzer commented on code in PR #12855:
URL: https://github.com/apache/iceberg/pull/12855#discussion_r2074097611


##########
data/src/test/java/org/apache/iceberg/data/DeleteReadTests.java:
##########
@@ -586,6 +595,75 @@ public void testEqualityDeleteByNull() throws IOException {
     checkDeleteCount(1L);
   }
 
+  /** Regression test for https://github.com/apache/iceberg/issues/11239 */
+  @TestTemplate
+  public void testEqualityDeleteBinaryColumn() throws IOException {
+    testEqualityDeleteWithColumn(
+        "binaryData", (i) -> ByteBuffer.wrap(("binaryData_" + i).getBytes()));
+  }
+
+  @TestTemplate
+  public void testEqualityDeleteStructColumn() throws IOException {
+    testEqualityDeleteWithColumn(
+        "structData",
+        (i) -> {
+          Record structRecord =
+              
GenericRecord.create(table.schema().findType("structData").asStructType());
+          structRecord.setField("structInnerData", "structInnerData_" + i);
+          return structRecord;
+        });
+  }
+
+  private <T> void testEqualityDeleteWithColumn(
+      String targetFieldName, Function<Integer, T> targetFieldValueSupplier) 
throws IOException {

Review Comment:
   Let's avoid a functional interface if we can. Seems like the only thing we 
are actually avoiding is defining dataDeletes? 
   
   I would suggest refactoring this so that instead to either look like the 
testEqualityDateDeletes or generating another test method
   testEqualityDeletes(List<record> data, List<Record> equalityDeletes, 
List<Record> expected)?
   
   Something like that



-- 
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-unsubscr...@iceberg.apache.org

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


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

Reply via email to