File tree Expand file tree Collapse file tree 2 files changed +4
-23
lines changed
main/java/com/linkedin/data/avro
test/java/com/linkedin/data/avro Expand file tree Collapse file tree 2 files changed +4
-23
lines changed Original file line number Diff line number Diff line change @@ -553,8 +553,8 @@ else if (fieldValue == null)
553
553
else
554
554
{
555
555
appendMessage ("required field is absent" );
556
- _path .removeLast ();
557
556
}
557
+ _path .removeLast ();
558
558
continue ;
559
559
}
560
560
Object fieldAvroValue = translate (fieldValue , fieldDataSchema , fieldAvroSchema );
Original file line number Diff line number Diff line change @@ -927,7 +927,7 @@ public void testAvroSchemaMissingFields() throws IOException
927
927
@ Test
928
928
public void testMissingDefaultFieldsOnDataMap () throws IOException
929
929
{
930
- final String P_SCHEMA =
930
+ final String SCHEMA =
931
931
"{" +
932
932
" \" type\" :\" record\" ," +
933
933
" \" name\" :\" Foo\" ," +
@@ -946,27 +946,8 @@ public void testMissingDefaultFieldsOnDataMap() throws IOException
946
946
" }" +
947
947
" ]" +
948
948
"}" ;
949
- final String A_SCHEMA =
950
- "{" +
951
- " \" type\" :\" record\" ," +
952
- " \" name\" :\" Foo\" ," +
953
- " \" fields\" :[" +
954
- " {\n " +
955
- " \" name\" :\" field1\" ," +
956
- " \" type\" :\" string\" " +
957
- " },\n " +
958
- " {\n " +
959
- " \" name\" :\" field2\" ," +
960
- " \" type\" :{\n " +
961
- " \" type\" :\" array\" ," +
962
- " \" items\" :\" string\" " +
963
- " }," +
964
- " \" default\" :[ ]" +
965
- " }" +
966
- " ]" +
967
- "}" ;
968
- RecordDataSchema pegasusSchema = (RecordDataSchema )TestUtil .dataSchemaFromString (P_SCHEMA );
969
- Schema avroShema = Schema .parse (A_SCHEMA );
949
+ RecordDataSchema pegasusSchema = (RecordDataSchema )TestUtil .dataSchemaFromString (SCHEMA );
950
+ Schema avroShema = Schema .parse (SCHEMA );
970
951
DataMap dataMap = new DataMap ();
971
952
dataMap .put ("field1" , "test" );
972
953
GenericRecord record = DataTranslator .dataMapToGenericRecord (dataMap , pegasusSchema , avroShema );
You can’t perform that action at this time.
0 commit comments