Class StringTransfer

java.lang.Object
com.illumon.iris.db.v2.parquet.transfer.StringTransfer
All Implemented Interfaces:
TransferObject<org.apache.parquet.io.api.Binary[]>, SafeCloseable, AutoCloseable

public class StringTransfer extends Object implements TransferObject<org.apache.parquet.io.api.Binary[]>
  • Constructor Details

    • StringTransfer

      public StringTransfer(@NotNull ColumnSource<?> columnSource, int targetSize)
  • Method Details

    • getBuffer

      public org.apache.parquet.io.api.Binary[] getBuffer()
      Description copied from interface: TransferObject
      Get the buffer suitable for writing to a Parquet file
      Specified by:
      getBuffer in interface TransferObject<org.apache.parquet.io.api.Binary[]>
      Returns:
      the buffer
    • rowCount

      public int rowCount()
      Description copied from interface: TransferObject
      Get the number of rows contained within the current transfer set to be written
      Specified by:
      rowCount in interface TransferObject<org.apache.parquet.io.api.Binary[]>
      Returns:
      the number of rows that are ready to write to the Parquet file
    • fetchData

      public void fetchData(@NotNull OrderedKeys rs)
      Description copied from interface: TransferObject
      Copy the data from the upstream ColumnSource into this object in preparation for writing
      Specified by:
      fetchData in interface TransferObject<org.apache.parquet.io.api.Binary[]>
      Parameters:
      rs - the OrderedKeys to copy
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface SafeCloseable
    • updateStatistics

      public <T extends Comparable<T>> void updateStatistics(@NotNull org.apache.parquet.column.statistics.Statistics<T> stats)
      Description copied from interface: TransferObject
      After a sequence of calls to TransferObject.fetchData(OrderedKeys) this may be called to append statistic information into the Parquet footer for readers.
      Specified by:
      updateStatistics in interface TransferObject<org.apache.parquet.io.api.Binary[]>