Package org.apache.parquet.arrow.schema
Class SchemaConverter
- java.lang.Object
-
- org.apache.parquet.arrow.schema.SchemaConverter
-
public class SchemaConverter extends Object
Logic to convert Parquet and Arrow Schemas back and forth and maintain the mapping
-
-
Constructor Summary
Constructors Constructor Description SchemaConverter()For when we'll need this to be configurableSchemaConverter(boolean convertInt96ToArrowTimestamp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SchemaMappingfromArrow(org.apache.arrow.vector.types.pojo.Schema arrowSchema)Creates a Parquet Schema from an Arrow one and returns the mappingSchemaMappingfromParquet(org.apache.parquet.schema.MessageType parquetSchema)Creates an Arrow Schema from an Parquet one and returns the mappingSchemaMappingmap(org.apache.arrow.vector.types.pojo.Schema arrowSchema, org.apache.parquet.schema.MessageType parquetSchema)Maps a Parquet and Arrow Schema For now does not validate primitive type compatibility
-
-
-
Method Detail
-
fromArrow
public SchemaMapping fromArrow(org.apache.arrow.vector.types.pojo.Schema arrowSchema)
Creates a Parquet Schema from an Arrow one and returns the mapping- Parameters:
arrowSchema- the provided Arrow Schema- Returns:
- the mapping between the 2
-
fromParquet
public SchemaMapping fromParquet(org.apache.parquet.schema.MessageType parquetSchema)
Creates an Arrow Schema from an Parquet one and returns the mapping- Parameters:
parquetSchema- the provided Parquet Schema- Returns:
- the mapping between the 2
-
map
public SchemaMapping map(org.apache.arrow.vector.types.pojo.Schema arrowSchema, org.apache.parquet.schema.MessageType parquetSchema)
Maps a Parquet and Arrow Schema For now does not validate primitive type compatibility- Parameters:
arrowSchema- an Arrow schemaparquetSchema- a Parquet message type- Returns:
- the mapping between the 2
-
-