Interface VectorCursor

All Superinterfaces:
VectorSizeInspector
All Known Implementing Classes:
FrameVectorCursor

public interface VectorCursor extends VectorSizeInspector
Vectorized cursor used during query execution. VectorCursors are available from CursorFactory.makeCursorHolder(CursorBuildSpec) via CursorHolder.asVectorCursor().

See VectorCursorGranularizer for a helper that makes it easier for query engines to do time granularization.

An example of how to use the methods in this class:

   try (CursorHolder cursorHolder = adapter.makeCursorHolder(...)) {
     VectorCursor cursor = cursorHolder.asVectorCursor();
     // ProcessorClass is some vectorized processor class.
     ProcessorClass o = makeProcessor(cursor.getColumnSelectorFactory());
     for (; !cursor.isDone(); cursor.advance()) {
       o.process();
     }
   }
 
  • Method Details

    • getColumnSelectorFactory

      VectorColumnSelectorFactory getColumnSelectorFactory()
      Returns a vectorized column selector factory.
    • advance

      void advance()
      Advances the cursor, skipping forward a number of rows equal to the current vector size.
    • isDone

      boolean isDone()
      Returns false if the cursor is readable, true if it has nothing left to read.
    • reset

      void reset()
      Resets the cursor back to its original state. Useful for query engines that want to make multiple passes.