Class ArrowSerializer

java.lang.Object
org.apache.flink.table.runtime.arrow.serializers.ArrowSerializer

@Internal public final class ArrowSerializer extends Object
The base class ArrowSerializer which will serialize/deserialize RowType data to/from arrow bytes.
  • Field Details

    • inputType

      protected final org.apache.flink.table.types.logical.RowType inputType
      The input RowType.
    • outputType

      protected final org.apache.flink.table.types.logical.RowType outputType
      The output RowType.
  • Constructor Details

    • ArrowSerializer

      public ArrowSerializer(org.apache.flink.table.types.logical.RowType inputType, org.apache.flink.table.types.logical.RowType outputType)
  • Method Details

    • open

      public void open(InputStream bais, OutputStream baos) throws Exception
      Throws:
      Exception
    • load

      public int load() throws IOException
      Throws:
      IOException
    • read

      public org.apache.flink.table.data.RowData read(int i)
    • write

      public void write(org.apache.flink.table.data.RowData element)
    • close

      public void close() throws Exception
      Throws:
      Exception
    • createArrowWriter

      public ArrowWriter<org.apache.flink.table.data.RowData> createArrowWriter()
      Creates an ArrowWriter.
    • createArrowReader

      public ArrowReader createArrowReader(org.apache.arrow.vector.VectorSchemaRoot root)
    • finishCurrentBatch

      public void finishCurrentBatch() throws Exception
      Forces to finish the processing of the current batch of elements. It will serialize the batch of elements into one arrow batch.
      Throws:
      Exception
    • resetReader

      public void resetReader() throws IOException
      Throws:
      IOException
    • resetWriter

      public void resetWriter() throws IOException
      Throws:
      IOException