Class ProjectingPagesWindowIndex
- All Implemented Interfaces:
InternalWindowIndex,WindowIndex
The purpose of this class is to provide input for aggregations in a consistent way, regardless of whether the aggregation uses an input channel, or a runtime-evaluated expression as the argument.
The latter case applies to aggregate functions within the DEFINE and MEASURES clauses of row pattern recognition. The aggregated argument can be based on CLASSIFIER() or MATCH_NUMBER() results which are not present in the input, and thus needs to be evaluated at runtime while processing a row.
E.g. for the aggregate function array_agg(lower(CLASSIFIER(X))), there is no input channel containing the aggregated argument, so it is evaluated row by row at runtime and passed in an additional "channel" available to the aggregation's accumulator by a standard WindowIndex interface.
-
Constructor Summary
ConstructorsConstructorDescriptionProjectingPagesWindowIndex(PagesIndex pagesIndex, int start, int end, List<ArgumentComputation> projections, List<String> labelNames) -
Method Summary
Modifier and TypeMethodDescriptionvoidappendTo(int channel, int position, BlockBuilder output) booleangetBoolean(int channel, int position) doublegetDouble(int channel, int position) longgetLong(int channel, int position) getObject(int channel, int position) getRawBlock(int channel, int position) intgetRawBlockPosition(int position) getSingleValueBlock(int channel, int position) io.airlift.slice.SlicegetSlice(int channel, int position) booleanisNull(int channel, int position) voidsetLabelAndMatchNumber(int currentPosition, int label, long matchNumber) intsize()toString()
-
Constructor Details
-
ProjectingPagesWindowIndex
public ProjectingPagesWindowIndex(PagesIndex pagesIndex, int start, int end, List<ArgumentComputation> projections, List<String> labelNames)
-
-
Method Details
-
setLabelAndMatchNumber
public void setLabelAndMatchNumber(int currentPosition, int label, long matchNumber) -
size
public int size()- Specified by:
sizein interfaceWindowIndex
-
isNull
public boolean isNull(int channel, int position) - Specified by:
isNullin interfaceWindowIndex
-
getBoolean
public boolean getBoolean(int channel, int position) - Specified by:
getBooleanin interfaceWindowIndex
-
getLong
public long getLong(int channel, int position) - Specified by:
getLongin interfaceWindowIndex
-
getDouble
public double getDouble(int channel, int position) - Specified by:
getDoublein interfaceWindowIndex
-
getSlice
public io.airlift.slice.Slice getSlice(int channel, int position) - Specified by:
getSlicein interfaceWindowIndex
-
getSingleValueBlock
- Specified by:
getSingleValueBlockin interfaceWindowIndex
-
getObject
- Specified by:
getObjectin interfaceWindowIndex
-
appendTo
- Specified by:
appendToin interfaceWindowIndex
-
getRawBlock
- Specified by:
getRawBlockin interfaceInternalWindowIndex
-
getRawBlockPosition
public int getRawBlockPosition(int position) - Specified by:
getRawBlockPositionin interfaceInternalWindowIndex
-
toString
-