Package org.apache.druid.segment
Class UnnestColumnValueSelectorCursor
- java.lang.Object
-
- org.apache.druid.segment.UnnestColumnValueSelectorCursor
-
- All Implemented Interfaces:
Cursor
public class UnnestColumnValueSelectorCursor extends Object implements Cursor
The cursor to help unnest MVDs without dictionary encoding and ARRAY type selectors.Consider a segment has 2 rows ['a', 'b', 'c'] ['d', 'e']
The baseCursor points to the row ['a', 'b', 'c'] while the unnestCursor with each call of advance() moves over individual elements.
unnestCursor.advance() -> 'a' unnestCursor.advance() -> 'b' unnestCursor.advance() -> 'c' unnestCursor.advance() -> 'd' (advances base cursor first) unnestCursor.advance() -> 'e'
The index reference points to the index of each row that the unnest cursor is accessing through currentVal The index ranges from 0 to the size of the list in each row which is held in the unnestListForCurrentRow
The needInitialization flag sets up the initial values of unnestListForCurrentRow at the beginning of the segment
-
-
Constructor Summary
Constructors Constructor Description UnnestColumnValueSelectorCursor(Cursor cursor, ColumnSelectorFactory baseColumnSelectorFactory, VirtualColumn unnestColumn, String outputColumnName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
advance()
void
advanceUninterruptibly()
ColumnSelectorFactory
getColumnSelectorFactory()
org.joda.time.DateTime
getTime()
boolean
isDone()
boolean
isDoneOrInterrupted()
void
reset()
-
-
-
Constructor Detail
-
UnnestColumnValueSelectorCursor
public UnnestColumnValueSelectorCursor(Cursor cursor, ColumnSelectorFactory baseColumnSelectorFactory, VirtualColumn unnestColumn, String outputColumnName)
-
-
Method Detail
-
getColumnSelectorFactory
public ColumnSelectorFactory getColumnSelectorFactory()
- Specified by:
getColumnSelectorFactory
in interfaceCursor
-
advanceUninterruptibly
public void advanceUninterruptibly()
- Specified by:
advanceUninterruptibly
in interfaceCursor
-
isDoneOrInterrupted
public boolean isDoneOrInterrupted()
- Specified by:
isDoneOrInterrupted
in interfaceCursor
-
-