Interface RowSetReader

All Superinterfaces:
ColumnReader, TupleReader
All Known Implementing Classes:

public interface RowSetReader extends TupleReader
Reader for all types of row sets: those with or without a selection vector. Iterates over "bare" row sets in row order. Iterates over selection-vector based row sets in selection vector order.
  • Method Details

    • rowCount

      int rowCount()
      Total number of rows in the row set.
      total number of rows
    • hasNext

      boolean hasNext()
      Convenience method which whether the next call to next() will succeed. Purely optional.
      true if there is another record to read, false if not
    • next

      boolean next()
      Advance to the next position. If the underlying row set has a selection vector, then moves one position in the selection vector, and to whichever data record is indexed.
      true if another row is available, false if all rows have been read
    • logicalIndex

      int logicalIndex()
      Gets the read position within the row set. If the row set has a selection vector, this is the position in that vector; the actual record location will likely differ. Use offset() to get the actual row index.
      current iteration position
    • setPosition

      void setPosition(int index)
      Sets the iteration position. If the row set has a selection vector, this sets the index within that vector. The index must be from -1 to the rowCount() - 1. Set the value to one less than the position to be read in the next call to next(). An index of -1 means before the first row.
      index - the desired index position
    • rewind

      void rewind()
      Reset the position to before the first row. Convenient method which is the same as setPosition(-1).
    • hyperVectorIndex

      int hyperVectorIndex()
      Batch index: 0 for a single batch, batch for the current row is a hyper-batch.
      index of the batch for the current row
    • offset

      int offset()
      The index of the underlying row which may be indexed by an SV2 or SV4.
      index of the underlying row
    • newBatch

      void newBatch()
      Bind the reader to a new batch of data. The vectors are unchanged, but the buffers are different. Assumes the schema has not changed: the columns and selection vector mode remain unchanged; only the buffers changed. If the schema changes, discard this reader and rebuild a new one.