public abstract class NoFrameSupportTemplate extends Object implements WindowFramer
FRAME_TEMPLATE_DEFINITION, NOFRAME_TEMPLATE_DEFINITION| Constructor and Description |
|---|
NoFrameSupportTemplate() |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup() |
abstract void |
copyFromInternal(int inIndex,
int outIndex) |
abstract void |
copyNext(int inIndex,
int outIndex)
copies value(s) from inIndex row to outIndex row.
|
abstract void |
copyPrev(int inIndex,
int outIndex)
copies value(s) from inIndex row to outIndex row.
|
void |
doWork()
processes all rows of the first batch.
|
int |
getOutputCount() |
abstract 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
expression
|
abstract boolean |
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
expression
|
abstract void |
outputRow(int outIndex,
Partition partition)
called once for each row after we evaluate all peer rows.
|
abstract boolean |
resetValues()
reset all window functions
|
void |
setup(List<WindowDataBatch> batches,
VectorContainer container,
OperatorContext oContext,
boolean requireFullPartition,
WindowPOP popConfig) |
abstract void |
setupCopyFromInternal(VectorAccessible incoming,
VectorAccessible outgoing) |
abstract void |
setupCopyNext(VectorAccessible incoming,
VectorAccessible outgoing) |
abstract void |
setupCopyPrev(VectorAccessible incoming,
VectorAccessible outgoing) |
abstract void |
setupPartition(WindowDataBatch incoming,
VectorAccessible outgoing)
Called once per partition, before processing the partition.
|
public void setup(List<WindowDataBatch> batches, VectorContainer container, OperatorContext oContext, boolean requireFullPartition, WindowPOP popConfig) throws SchemaChangeException
setup in interface WindowFramerSchemaChangeExceptionpublic void doWork()
throws DrillException
doWork in interface WindowFramerDrillExceptionpublic int getOutputCount()
getOutputCount in interface WindowFramerpublic void cleanup()
cleanup in interface WindowFramerpublic abstract void outputRow(@Named(value="outIndex")
int outIndex,
@Named(value="partition")
Partition partition)
throws SchemaChangeException
outIndex - index of rowpartition - object used by "computed" window functionsSchemaChangeExceptionpublic abstract void setupPartition(@Named(value="incoming")
WindowDataBatch incoming,
@Named(value="outgoing")
VectorAccessible outgoing)
throws SchemaChangeException
incoming - batch we will read fromoutgoing - batch we will be writing toSchemaChangeExceptionpublic abstract void copyNext(@Named(value="inIndex")
int inIndex,
@Named(value="outIndex")
int outIndex)
throws SchemaChangeException
inIndex - source row of the copyoutIndex - destination row of the copy.SchemaChangeExceptionpublic abstract void setupCopyNext(@Named(value="incoming")
VectorAccessible incoming,
@Named(value="outgoing")
VectorAccessible outgoing)
throws SchemaChangeException
SchemaChangeExceptionpublic abstract void copyPrev(@Named(value="inIndex")
int inIndex,
@Named(value="outIndex")
int outIndex)
throws SchemaChangeException
inIndex - source row of the copyoutIndex - destination row of the copy.SchemaChangeExceptionpublic abstract void setupCopyPrev(@Named(value="incoming")
VectorAccessible incoming,
@Named(value="outgoing")
VectorAccessible outgoing)
throws SchemaChangeException
SchemaChangeExceptionpublic abstract void copyFromInternal(@Named(value="inIndex")
int inIndex,
@Named(value="outIndex")
int outIndex)
throws SchemaChangeException
SchemaChangeExceptionpublic abstract void setupCopyFromInternal(@Named(value="incoming")
VectorAccessible incoming,
@Named(value="outgoing")
VectorAccessible outgoing)
throws SchemaChangeException
SchemaChangeExceptionpublic abstract boolean resetValues()
throws SchemaChangeException
SchemaChangeExceptionpublic abstract boolean isSamePartition(@Named(value="b1Index")
int b1Index,
@Named(value="b1")
VectorAccessible b1,
@Named(value="b2Index")
int b2Index,
@Named(value="b2")
VectorAccessible b2)
throws SchemaChangeException
isSamePartition in interface WindowFramerb1Index - index of first rowb1 - batch for first rowb2Index - index of second rowb2 - batch for second rowSchemaChangeExceptionpublic abstract boolean isPeer(@Named(value="b1Index")
int b1Index,
@Named(value="b1")
VectorAccessible b1,
@Named(value="b2Index")
int b2Index,
@Named(value="b2")
VectorAccessible b2)
throws SchemaChangeException
isPeer in interface WindowFramerb1Index - index of first rowb1 - batch for first rowb2Index - index of second rowb2 - batch for second rowSchemaChangeExceptionCopyright © 2017 The Apache Software Foundation. All rights reserved.