rdblue commented on code in PR #11811:
URL: https://github.com/apache/iceberg/pull/11811#discussion_r1890507433
##########
data/src/test/java/org/apache/iceberg/data/DataTestHelpers.java:
##########
@@ -36,7 +36,10 @@ public static void assertEquals(Types.StructType struct,
Record expected, Record
assertEquals(
field.type(), expected.getField(expectedField.name()),
actual.getField(field.name()));
} else {
-
assertThat(actual.getField(field.name())).isEqualTo(field.initialDefault());
+ assertEquals(
+ field.type(),
+ GenericDataUtil.internalToGeneric(field.type(),
field.initialDefault()),
+ actual.getField(field.name()));
Review Comment:
This was the test bug. Rather than asserting that the value was passed back
unchanged, it should have delegated to `assertEquals` that checks the
representation of the value.
The expected value (default) also needs to be converted to generic because
the generic data model tests use the generic data model as the source
representation.
--
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]