Interface TransferObject<B>

Type Parameters:
B -
All Superinterfaces:
AutoCloseable, SafeCloseable
All Known Implementing Classes:
BooleanTransfer, ByteTransfer, CharTransfer, CodecTransfer, DoubleTransfer, FloatTransfer, IntTransfer, LongTransfer, ShortTransfer, StringTransfer

public interface TransferObject<B> extends SafeCloseable
Classes that implement this interface are responsible for converting data from individual DH columns into buffers to be written out to the Parquet file.
  • Method Details

    • create

      static <DATA_TYPE> TransferObject<?> create(@NotNull Map<String,Map<ParquetCacheTags,Object>> computedCache, @NotNull ReadOnlyIndex tableRowSet, @NotNull ColumnSource<DATA_TYPE> columnSource, @NotNull com.illumon.dataobjects.ColumnDefinition<DATA_TYPE> columnDefinition, int maxValuesPerPage, @NotNull Class<DATA_TYPE> columnType, @NotNull ParquetInstructions instructions)
      Create an appropriate TransferObject to copy data from upstream ColumnSources into appropriate buffer format for a Parquet ColumnWriter
      Type Parameters:
      DATA_TYPE -
      Parameters:
      computedCache -
      tableRowSet -
      columnSource -
      columnDefinition -
      maxValuesPerPage -
      columnType -
      instructions -
      Returns:
    • getBuffer

      B getBuffer()
      Get the buffer suitable for writing to a Parquet file
      Returns:
      the buffer
    • rowCount

      int rowCount()
      Get the number of rows contained within the current transfer set to be written
      Returns:
      the number of rows that are ready to write to the Parquet file
    • fetchData

      void fetchData(@NotNull OrderedKeys rs)
      Copy the data from the upstream ColumnSource into this object in preparation for writing
      Parameters:
      rs - the OrderedKeys to copy
    • updateStatistics

      <T extends Comparable<T>> void updateStatistics(@NotNull org.apache.parquet.column.statistics.Statistics<T> stats)
      After a sequence of calls to fetchData(OrderedKeys) this may be called to append statistic information into the Parquet footer for readers.
      Type Parameters:
      T -
      Parameters:
      stats -