Class BaseAvroProducer<T extends FieldVector>

java.lang.Object
org.apache.arrow.adapter.avro.producers.BaseAvroProducer<T>
Type Parameters:
T - vector type.
All Implemented Interfaces:
Producer<T>
Direct Known Subclasses:
AvroBigIntProducer, AvroBooleanProducer, AvroBytesProducer, AvroDateMilliProducer, AvroDecimal256Producer, AvroDecimalProducer, AvroEnumProducer, AvroFixedSizeBinaryProducer, AvroFixedSizeListProducer, AvroFloat2Producer, AvroFloat4Producer, AvroFloat8Producer, AvroIntProducer, AvroListProducer, AvroMapProducer, AvroNullableProducer, AvroNullProducer, AvroSmallIntProducer, AvroStringProducer, AvroStructProducer, AvroTimeNanoProducer, AvroTimeSecProducer, AvroTimestampSecProducer, AvroTimestampSecTzProducer, AvroTinyIntProducer, AvroUint1Producer, AvroUint2Producer, AvroUint4Producer, AvroUint8Producer

public abstract class BaseAvroProducer<T extends FieldVector> extends Object implements Producer<T>
Base class for avro producers.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
     
    protected T
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Constructs a base avro consumer.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the vector within the producer.
    void
    Reset the vector within producer.
    void
    setPosition(int index)
    Sets the current index for this producer against the underlying vector.
    void
    Skip null value in the vector by setting reader position + 1.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.arrow.adapter.avro.producers.Producer

    produce
  • Field Details

    • vector

      protected T extends FieldVector vector
    • currentIndex

      protected int currentIndex
  • Constructor Details

    • BaseAvroProducer

      protected BaseAvroProducer(T vector)
      Constructs a base avro consumer.
      Parameters:
      vector - the vector to consume.
  • Method Details

    • skipNull

      public void skipNull()
      Description copied from interface: Producer
      Skip null value in the vector by setting reader position + 1.
      Specified by:
      skipNull in interface Producer<T extends FieldVector>
    • setPosition

      public void setPosition(int index)
      Sets the current index for this producer against the underlying vector.

      For a vector of length N, the valid range is [0, N] inclusive. Setting index = N signifies that no further data is available for production (this is the state the produce will be in when production for the current vector is complete).

      Specified by:
      setPosition in interface Producer<T extends FieldVector>
      Parameters:
      index - New current index for the producer
    • resetValueVector

      public void resetValueVector(T vector)
      Description copied from interface: Producer
      Reset the vector within producer.
      Specified by:
      resetValueVector in interface Producer<T extends FieldVector>
    • getVector

      public T getVector()
      Description copied from interface: Producer
      Get the vector within the producer.
      Specified by:
      getVector in interface Producer<T extends FieldVector>