Interface AvroTypeManager

All Known Implementing Classes:
NativeLogicalTypesAvroTypeManager

public interface AvroTypeManager
  • Method Details

    • configure

      void configure(Map<String,byte[]> fileMetadata)
      Called when the type manager is reading out data from a data file such as in AvroFileReader
      Parameters:
      fileMetadata - metadata from the file header
    • overrideTypeForSchema

      Optional<Type> overrideTypeForSchema(org.apache.avro.Schema schema) throws AvroTypeException
      Throws:
      AvroTypeException
    • overrideBuildingFunctionForSchema

      Optional<BiConsumer<BlockBuilder,Object>> overrideBuildingFunctionForSchema(org.apache.avro.Schema schema) throws AvroTypeException
      Object provided by FasterReader's deserialization with no conversions. Object class determined by Avro's standard generic data process BlockBuilder provided by Type returned above for the schema Possible to override for each primitive type as well.
      Throws:
      AvroTypeException
    • overrideBlockToAvroObject

      Optional<BiFunction<Block,Integer,Object>> overrideBlockToAvroObject(org.apache.avro.Schema schema, Type type) throws AvroTypeException
      Extract and convert the object from the given block at the given position and return the Avro Generic Data forum. Type is either provided explicitly to the writer or derived from the schema using this interface.
      Throws:
      AvroTypeException