Class ReaderIndex
java.lang.Object
org.apache.drill.exec.physical.resultSet.model.ReaderIndex
- All Implemented Interfaces:
ColumnReaderIndex
- Direct Known Subclasses:
DirectRowIndex,HyperRowIndex,IndirectRowIndex
Row set index base class used when indexing rows within a row
set for a row set reader. Keeps track of the current position,
which starts before the first row, meaning that the client
must call next() to advance to the first row.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasNext()Reports if the index has another item.intOrdinal index within the batch or array.booleannext()Advances the index to the next position.voidset(int index) intsize()Return the number of items that this index indexes: top-level record count for the root index; total element count for nested arrays.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.drill.exec.vector.accessor.ColumnReaderIndex
hyperVectorIndex, offset
-
Field Details
-
position
protected int position -
rowCount
-
-
Constructor Details
-
ReaderIndex
-
-
Method Details
-
set
public void set(int index) -
logicalIndex
public int logicalIndex()Description copied from interface:ColumnReaderIndexOrdinal index within the batch or array. Increments from -1. (The position before the first item.) Identifies the logical row number of top-level records, or the array element for arrays. Actual physical index may be different if an indirection layer is in use.- Specified by:
logicalIndexin interfaceColumnReaderIndex- Returns:
- logical read index
-
size
public int size()Description copied from interface:ColumnReaderIndexReturn the number of items that this index indexes: top-level record count for the root index; total element count for nested arrays.- Specified by:
sizein interfaceColumnReaderIndex- Returns:
- element count at this index level
-
next
public boolean next()Description copied from interface:ColumnReaderIndexAdvances the index to the next position. Used:- At the top level for normal readers or invalid input: '<'liAt a nested level for implicit join readers, and
- An each array level to iterate over arrays.
- Specified by:
nextin interfaceColumnReaderIndex- Returns:
- true if another value is available, false if EOF
-
hasNext
public boolean hasNext()Description copied from interface:ColumnReaderIndexReports if the index has another item.- Specified by:
hasNextin interfaceColumnReaderIndex- Returns:
if more rows remain. That is, if a call to ColumnReaderIndex.next()would return true.
-