Class FrameBasedIndexedTable

java.lang.Object
org.apache.druid.segment.join.table.FrameBasedIndexedTable
All Implemented Interfaces:
Closeable, AutoCloseable, IndexedTable, ReferenceCountedObjectProvider<Closeable>

public class FrameBasedIndexedTable extends Object implements IndexedTable
  • Constructor Details

  • Method Details

    • version

      public String version()
      Description copied from interface: IndexedTable
      Returns the version of this table, used to compare against when loading a new version of the table
      Specified by:
      version in interface IndexedTable
    • keyColumns

      public Set<String> keyColumns()
      Description copied from interface: IndexedTable
      Returns the columns of this table that have indexes.
      Specified by:
      keyColumns in interface IndexedTable
    • rowSignature

      public RowSignature rowSignature()
      Description copied from interface: IndexedTable
      Returns the signature of this table, which includes all key columns (as well as other columns that can be selected, but are not keys).
      Specified by:
      rowSignature in interface IndexedTable
    • numRows

      public int numRows()
      Description copied from interface: IndexedTable
      Returns the number of rows in this table. It must not change over time, since it is used for things like algorithm selection and reporting of cardinality metadata.
      Specified by:
      numRows in interface IndexedTable
    • columnIndex

      public IndexedTable.Index columnIndex(int column)
      Description copied from interface: IndexedTable
      Returns the index for a particular column. The provided column number must be that column's position in IndexedTable.rowSignature().
      Specified by:
      columnIndex in interface IndexedTable
    • columnReader

      public IndexedTable.Reader columnReader(int column)
      Description copied from interface: IndexedTable
      Returns a reader for a particular column. The provided column number must be that column's position in IndexedTable.rowSignature(). Don't forget to close your IndexedTable.Reader when finished reading, to clean up any resources.
      Specified by:
      columnReader in interface IndexedTable
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • acquireReference

      public Optional<Closeable> acquireReference()
      Description copied from interface: ReferenceCountedObjectProvider
      This method increments a reference count and provides a Closeable that decrements the reference count when closed. The object returned by this method may or may not be thread-safe, it is best to check with the implementation.

      IMPORTANT NOTE: to fulfill the contract of this method, implementors must return a closeable to indicate that the reference can be acquired, even if there is nothing to close. Implementors should ideally avoid allowing this method to throw exceptions, but callers are responsible for closing the returned object should any operations on it throw exceptions.

      For callers: if this method returns non-empty, IT MUST BE CLOSED, else reference counts can potentially leak.

      Specified by:
      acquireReference in interface ReferenceCountedObjectProvider<Closeable>