Class NullableScalarWriter.ChildIndex
java.lang.Object
org.apache.drill.exec.vector.accessor.writer.NullableScalarWriter.ChildIndex
- All Implemented Interfaces:
ColumnWriterIndex
- Enclosing class:
- NullableScalarWriter
public static final class NullableScalarWriter.ChildIndex
extends Object
implements ColumnWriterIndex
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Increment the index for an array.If this index represents a repeat level, return the index of the next higher repeat level.void
Decrement the index for an array.void
rollover()
When handling overflow, the index must be reset so that the current row starts at the start of the vector.int
Index of the first entry for the current rowint
Current row or array index.
-
Constructor Details
-
ChildIndex
-
-
Method Details
-
rowStartIndex
public int rowStartIndex()Description copied from interface:ColumnWriterIndex
Index of the first entry for the current row- Specified by:
rowStartIndex
in interfaceColumnWriterIndex
- Returns:
- index of the first entry for the current row
-
vectorIndex
public int vectorIndex()Description copied from interface:ColumnWriterIndex
Current row or array index.- Specified by:
vectorIndex
in interfaceColumnWriterIndex
- Returns:
- row or array index
-
nextElement
public void nextElement()Description copied from interface:ColumnWriterIndex
Increment the index for an array. For arrays, writing (or saving) one value automatically moves to the next value. Ignored for non-element indexes.- Specified by:
nextElement
in interfaceColumnWriterIndex
-
prevElement
public void prevElement()Description copied from interface:ColumnWriterIndex
Decrement the index for an array. Used exclusively for appending bytes to a VarChar, Var16Char or VarBytes column. Assumed to be followed by another call to nextElement().- Specified by:
prevElement
in interfaceColumnWriterIndex
-
rollover
public void rollover()Description copied from interface:ColumnWriterIndex
When handling overflow, the index must be reset so that the current row starts at the start of the vector. Relative offsets must be preserved. (That is, if the current write position for an array is four greater than the start, then that offset must now be reset to four from the start of the vector.)- Specified by:
rollover
in interfaceColumnWriterIndex
-
outerIndex
Description copied from interface:ColumnWriterIndex
If this index represents a repeat level, return the index of the next higher repeat level.- Specified by:
outerIndex
in interfaceColumnWriterIndex
- Returns:
- the outer repeat level index, if any
-