1919package org .apache .parquet .hadoop .example ;
2020
2121import static org .apache .parquet .schema .LogicalTypeAnnotation .intType ;
22+ import static org .apache .parquet .schema .PrimitiveType .PrimitiveTypeName .BINARY ;
2223import static org .apache .parquet .schema .PrimitiveType .PrimitiveTypeName .INT32 ;
2324import static org .apache .parquet .schema .PrimitiveType .PrimitiveTypeName .INT64 ;
24- import static org .apache .parquet .schema .PrimitiveType .PrimitiveTypeName .BINARY ;
2525import static org .junit .Assert .assertThrows ;
26- import org .apache .parquet .io .api .Binary ;
2726
2827import java .io .File ;
2928import java .io .IOException ;
3231import org .apache .parquet .example .data .simple .SimpleGroupFactory ;
3332import org .apache .parquet .hadoop .ParquetWriter ;
3433import org .apache .parquet .io .InvalidRecordException ;
34+ import org .apache .parquet .io .api .Binary ;
3535import org .apache .parquet .schema .MessageType ;
3636import org .apache .parquet .schema .Types ;
3737import org .junit .Rule ;
@@ -277,10 +277,8 @@ public void testValidationCanBeExplicitlyDisabled() throws IOException {
277277
278278 @ Test
279279 public void testBasicValidation () throws IOException {
280- MessageType schema = Types .buildMessage ()
281- .required (INT32 )
282- .named ("int32_field" )
283- .named ("test_schema" );
280+ MessageType schema =
281+ Types .buildMessage ().required (INT32 ).named ("int32_field" ).named ("test_schema" );
284282
285283 File tempFile = new File (tempFolder .getRoot (), "basic_validation.parquet" );
286284 Path outputPath = new Path (tempFile .getAbsolutePath ());
@@ -295,10 +293,8 @@ public void testBasicValidation() throws IOException {
295293 Group validGroup = groupFactory .newGroup ().append ("int32_field" , 42 );
296294 writer .write (validGroup );
297295
298- MessageType stringSchema = Types .buildMessage ()
299- .required (BINARY )
300- .named ("int32_field" )
301- .named ("test_schema" );
296+ MessageType stringSchema =
297+ Types .buildMessage ().required (BINARY ).named ("int32_field" ).named ("test_schema" );
302298
303299 SimpleGroupFactory stringGroupFactory = new SimpleGroupFactory (stringSchema );
304300 Group invalidGroup = stringGroupFactory .newGroup ().append ("int32_field" , Binary .fromString ("not_an_int" ));
0 commit comments