java.lang.Object
org.apache.arrow.adapter.avro.AvroToArrow

public class AvroToArrow extends Object
Utility class to convert Avro objects to columnar Arrow format objects.
  • 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 from Decoder and iteratively convert it to Arrow objects.
      Parameters:
      schema - avro schema
      decoder - avro decoder
      config - configuration of the conversion.
      Throws:
      IOException - on error
    • avroToAvroSchema

      public static Schema avroToAvroSchema(org.apache.avro.Schema schema, AvroToArrowConfig config)
      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 convert
      config - Configuration options for conversion
      Returns:
      The equivalent Arrow schema