java.lang.Object
org.apache.arrow.adapter.avro.AvroToArrow
Utility class to convert Avro objects to columnar Arrow format objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AvroToArrowVectorIteratoravroToArrowIterator(org.apache.avro.Schema schema, org.apache.avro.io.Decoder decoder, AvroToArrowConfig config) Fetch the data fromDecoderand iteratively convert it to Arrow objects.static SchemaavroToAvroSchema(org.apache.avro.Schema schema, AvroToArrowConfig config) Convert an Avro schema to its Arrow equivalent.
-
Constructor Details
-
AvroToArrow
public AvroToArrow()
-
-
Method Details
-
avroToArrowIterator
public static AvroToArrowVectorIterator avroToArrowIterator(org.apache.avro.Schema schema, org.apache.avro.io.Decoder decoder, AvroToArrowConfig config) throws IOException Fetch the data fromDecoderand iteratively convert it to Arrow objects.- Parameters:
schema- avro schemadecoder- avro decoderconfig- configuration of the conversion.- Throws:
IOException- on error
-
avroToAvroSchema
Convert an Avro schema to its Arrow equivalent.The resulting set of Arrow fields matches what would be set in the VSR after calling avroToArrow() or avroToArrowIterator(), respecting the configuration in the config parameter.
- Parameters:
schema- The Avro schema to convertconfig- Configuration options for conversion- Returns:
- The equivalent Arrow schema
-