Interface WindowFramer
- All Known Implementing Classes:
FrameSupportTemplate
,NoFrameSupportTemplate
public interface WindowFramer
-
Field Summary
Modifier and TypeFieldDescriptionstatic final TemplateClassDefinition<WindowFramer>
static final TemplateClassDefinition<WindowFramer>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanup()
void
doWork()
process the inner batch and write the aggregated values in the containerint
boolean
isPeer
(int b1Index, VectorAccessible b1, int b2Index, VectorAccessible b2) compares two rows from different batches (can be the same), if they have the same value for the order by expressionboolean
isSamePartition
(int b1Index, VectorAccessible b1, int b2Index, VectorAccessible b2) compares two rows from different batches (can be the same), if they have the same value for the partition by expressionvoid
setup
(List<WindowDataBatch> batches, VectorContainer container, OperatorContext operatorContext, boolean requireFullPartition, WindowPOP popConfig)
-
Field Details
-
NOFRAME_TEMPLATE_DEFINITION
-
FRAME_TEMPLATE_DEFINITION
-
-
Method Details
-
setup
void setup(List<WindowDataBatch> batches, VectorContainer container, OperatorContext operatorContext, boolean requireFullPartition, WindowPOP popConfig) throws SchemaChangeException - Throws:
SchemaChangeException
-
doWork
process the inner batch and write the aggregated values in the container- Throws:
SchemaChangeException
DrillException
-
getOutputCount
int getOutputCount()- Returns:
- number rows processed in last batch
-
cleanup
void cleanup() -
isSamePartition
boolean isSamePartition(@Named("b1Index") int b1Index, @Named("b1") VectorAccessible b1, @Named("b2Index") int b2Index, @Named("b2") VectorAccessible b2) throws SchemaChangeException compares two rows from different batches (can be the same), if they have the same value for the partition by expression- Parameters:
b1Index
- index of first rowb1
- batch for first rowb2Index
- index of second rowb2
- batch for second row- Returns:
- true if the rows are in the same partition
- Throws:
SchemaChangeException
-
isPeer
boolean isPeer(@Named("b1Index") int b1Index, @Named("b1") VectorAccessible b1, @Named("b2Index") int b2Index, @Named("b2") VectorAccessible b2) throws SchemaChangeException compares two rows from different batches (can be the same), if they have the same value for the order by expression- Parameters:
b1Index
- index of first rowb1
- batch for first rowb2Index
- index of second rowb2
- batch for second row- Returns:
- true if the rows are in the same partition
- Throws:
SchemaChangeException
-