public abstract class VectorPTFEvaluatorBase extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
inputColumnNum |
protected org.slf4j.Logger |
LOG |
protected int |
outputColumnNum |
Constructor and Description |
---|
VectorPTFEvaluatorBase(WindowFrameDef windowFrameDef,
int outputColumnNum) |
VectorPTFEvaluatorBase(WindowFrameDef windowFrameDef,
VectorExpression inputVecExpr,
int outputColumnNum) |
Modifier and Type | Method and Description |
---|---|
boolean |
canRunOptimizedCalculation(int rowNum,
Range range)
Whether the evaluator can calculate the result for a given range.
|
void |
doLastBatchWork() |
abstract void |
evaluateGroupBatch(VectorizedRowBatch batch) |
void |
evaluateInputExpr(VectorizedRowBatch batch) |
Object |
getGroupResult() |
boolean |
getNullsLast() |
int |
getOutputColumnNum() |
abstract ColumnVector.Type |
getResultColumnVectorType() |
boolean |
isCacheableForRange()
Whether the results calculated by this evaluator are eligible for caching by PTFValueCache.
|
boolean |
isGroupResultNull() |
void |
mapCustomColumns(int[] bufferedColumnMap)
VectorPTFGroupBatches class works on a subset of columns, which are mapped by an array of
changed indices.
|
void |
onPartitionEnd()
There might be some cleanup operations for evaluators that should not be taken care of after
every row (resetEvaluator), but rather on partition-level.
|
void |
onResultCalculated(Object result,
Range range)
This method is called by VectorPTFGroupBatches once the calculation is finished for a given
row/range, but before the next calculation is invoked.
|
abstract void |
resetEvaluator() |
Object |
runOnRange(int rowNum,
Range range,
VectorPTFGroupBatches batches) |
void |
setNullsLast(boolean nullsLast) |
abstract boolean |
streamsResult() |
protected int inputColumnNum
protected final int outputColumnNum
protected final org.slf4j.Logger LOG
public VectorPTFEvaluatorBase(WindowFrameDef windowFrameDef, VectorExpression inputVecExpr, int outputColumnNum)
public VectorPTFEvaluatorBase(WindowFrameDef windowFrameDef, int outputColumnNum)
public boolean getNullsLast()
public void setNullsLast(boolean nullsLast)
public void evaluateInputExpr(VectorizedRowBatch batch) throws HiveException
HiveException
public abstract void evaluateGroupBatch(VectorizedRowBatch batch) throws HiveException
HiveException
public void doLastBatchWork()
public abstract boolean streamsResult()
public int getOutputColumnNum()
public boolean isGroupResultNull()
public abstract ColumnVector.Type getResultColumnVectorType()
public Object getGroupResult()
public abstract void resetEvaluator()
public boolean canRunOptimizedCalculation(int rowNum, Range range)
public Object runOnRange(int rowNum, Range range, VectorPTFGroupBatches batches) throws HiveException
HiveException
public void onResultCalculated(Object result, Range range)
result
- range
- public void onPartitionEnd()
public boolean isCacheableForRange()
public void mapCustomColumns(int[] bufferedColumnMap)
Copyright © 2022 The Apache Software Foundation. All rights reserved.