rdblue commented on code in PR #12030: URL: https://github.com/apache/iceberg/pull/12030#discussion_r1925624176
########## spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/data/GenericsHelpers.java: ########## @@ -238,16 +254,17 @@ private static void assertEqualsUnsafe(Types.MapType map, Map<?, ?> expected, Ma for (int i = 0; i < expectedElements.size(); i += 1) { Map.Entry<?, ?> expectedPair = expectedElements.get(i); - Object actualKey = actualKeys.get(i, convert(keyType)); - Object actualValue = actualValues.get(i, convert(keyType)); + Object actualKey = actualKeys.isNullAt(i) ? null : actualKeys.get(i, convert(keyType)); + Object actualValue = actualValues.isNullAt(i) ? null : actualValues.get(i, convert(valueType)); Review Comment: This was the difference between the previous assertions that compare two InternalRow instances and the generic assertions. The internal row version was checking for null using `isNullAt` and the generic ones were not. I think this is most of an error in the tests, but in the case where `get` is called it is good to still return null rather than an incorrect map. -- 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