public class BasePartitionEvaluator extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
BasePartitionEvaluator.AvgPartitionDoubleEvaluator |
static class |
BasePartitionEvaluator.AvgPartitionEvaluator<ResultType extends org.apache.hadoop.io.Writable>
The partition evalulator for average function
|
static class |
BasePartitionEvaluator.AvgPartitionHiveDecimalEvaluator |
static class |
BasePartitionEvaluator.SumPartitionDoubleEvaluator |
static class |
BasePartitionEvaluator.SumPartitionEvaluator<ResultType extends org.apache.hadoop.io.Writable>
The base type for sum operator evaluator when a partition data is available
and streaming process is not possible.
|
static class |
BasePartitionEvaluator.SumPartitionHiveDecimalEvaluator |
static class |
BasePartitionEvaluator.SumPartitionLongEvaluator |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isCountEvaluator |
protected static org.slf4j.Logger |
LOG |
protected boolean |
nullsLast |
protected ObjectInspector |
outputOI |
protected List<PTFExpressionDef> |
parameters |
protected PTFPartition |
partition |
protected WindowFrameDef |
winFrame |
protected GenericUDAFEvaluator |
wrappedEvaluator |
| Constructor and Description |
|---|
BasePartitionEvaluator(GenericUDAFEvaluator wrappedEvaluator,
WindowFrameDef winFrame,
PTFPartition partition,
List<PTFExpressionDef> parameters,
ObjectInspector outputOI,
boolean nullsLast) |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
calcFunctionValue(PTFPartition.PTFPartitionIterator<Object> pItr,
LeadLagInfo leadLagInfo)
Given a partition iterator, calculate the function value
|
Object |
getPartitionAgg()
Get the aggregation for the whole partition.
|
Object |
iterate(int currentRow,
LeadLagInfo leadLagInfo)
Given the current row, get the aggregation for the window
|
protected Range |
newRange(int end,
int end2,
PTFPartition partition)
When there are no parameters specified, partition iterator can be made faster;
In such cases, it need not materialize the ROW from RowContainer.
|
protected static final org.slf4j.Logger LOG
protected final GenericUDAFEvaluator wrappedEvaluator
protected final WindowFrameDef winFrame
protected final PTFPartition partition
protected final List<PTFExpressionDef> parameters
protected final ObjectInspector outputOI
protected final boolean nullsLast
protected final boolean isCountEvaluator
public BasePartitionEvaluator(GenericUDAFEvaluator wrappedEvaluator, WindowFrameDef winFrame, PTFPartition partition, List<PTFExpressionDef> parameters, ObjectInspector outputOI, boolean nullsLast)
public Object getPartitionAgg() throws HiveException
HiveExceptionpublic Object iterate(int currentRow, LeadLagInfo leadLagInfo) throws HiveException
HiveExceptionprotected Object calcFunctionValue(PTFPartition.PTFPartitionIterator<Object> pItr, LeadLagInfo leadLagInfo) throws HiveException
pItr - the partition pointerHiveExceptionprotected Range newRange(int end, int end2, PTFPartition partition)
Copyright © 2024 The Apache Software Foundation. All rights reserved.