tprelle commented on a change in pull request #4283:
URL: https://github.com/apache/iceberg/pull/4283#discussion_r822046460
##########
File path:
mr/src/test/java/org/apache/iceberg/mr/hive/serde/objectinspector/TestIcebergRecordObjectInspector.java
##########
@@ -61,4 +61,17 @@ public void testIcebergRecordObjectInspector() {
Assert.assertEquals(innerRecord.get(0),
innerSoi.getStructFieldData(innerData, stringField));
}
+ @Test
+ public void testIcebergRecordObjectInspectorWithRowNull() {
+ Schema schema = new Schema(
+ required(1, "integer_field", Types.IntegerType.get()),
+ required(2, "struct_field", Types.StructType.of(
+ Types.NestedField.required(3, "string_field",
Types.StringType.get())))
+ );
+ StructObjectInspector soi = (StructObjectInspector)
IcebergObjectInspector.create(schema);
+ Assert.assertNull(soi.getStructFieldsDataAsList(null));
+ StructField integerField = soi.getStructFieldRef("integer_field");
+ Assert.assertNull(soi.getStructFieldData(null, integerField));
Review comment:
@kbendick @pvary, i have an integration test in
TestHiveIcebergStorageHandlerWithEngine and edit the commit message
Thanks for the review
--
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]