public SchemaMapping fromArrow ( Schema arrowSchema ) { List < Field > fields = arrowSchema . getFields ( ) ; List < TypeMapping > parquetFields = fromArrow ( fields ) ; MessageType parquetType = addToBuilder ( parquetFields , Types . buildMessage ( ) ) . named ( "root" ) ; return new SchemaMapping ( arrowSchema , parquetType , parquetFields ) ; }
Creates a Parquet Schema from an Arrow one and returns the mapping