rdblue commented on code in PR #11919:
URL: https://github.com/apache/iceberg/pull/11919#discussion_r1907587135


##########
core/src/test/java/org/apache/iceberg/avro/AvroTestHelpers.java:
##########
@@ -78,6 +79,18 @@ static void assertEquals(Types.StructType struct, Record 
expected, Record actual
     }
   }
 
+  static void assertEquals(Types.StructType struct, StructLike expected, 
StructLike actual) {
+    List<Types.NestedField> fields = struct.fields();
+    for (int i = 0; i < fields.size(); i += 1) {
+      Type fieldType = fields.get(i).type();
+
+      Object expectedValue = expected.get(i, Object.class);
+      Object actualValue = actual.get(i, Object.class);

Review Comment:
   Instead of `Object.class`, this should use `fieldType.typeId().javaClass()` 
because the internal object model uses those types.



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