rdblue commented on code in PR #13219:
URL: https://github.com/apache/iceberg/pull/13219#discussion_r2229655081
##########
spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/data/TestHelpers.java:
##########
@@ -428,6 +430,12 @@ private static void assertEqualsUnsafe(Type type, Object
expected, Object actual
assertThat(actual).as("Should be an
ArrayBasedMapData").isInstanceOf(MapData.class);
assertEqualsUnsafe(type.asNestedType().asMapType(), (Map<?, ?>)
expected, (MapData) actual);
break;
+ case VARIANT:
+ assertThat(expected).as("Should expect a
Variant").isInstanceOf(Variant.class);
+ assertThat(actual).as("Should be a
Variant").isInstanceOf(Variant.class);
+ VariantTestUtil.assertEqual(((Variant) expected).metadata(),
((Variant) actual).metadata());
+ VariantTestUtil.assertEqual(((Variant) expected).value(), ((Variant)
actual).value());
Review Comment:
This is already implemented in `GenericsHelpers`. Maybe it can be shared?
--
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]