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 |
protected static class |
BasePartitionEvaluator.Range
Internal class to represent a window range in a partition by searching the
relative position (ROWS) or relative value (RANGE) of the current row
|
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 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) |
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.
|
protected static BasePartitionEvaluator.Range |
getRange(WindowFrameDef winFrame,
int currRow,
PTFPartition p) |
Object |
iterate(int currentRow,
LeadLagInfo leadLagInfo)
Given the current row, get the aggregation for the window
|
protected final GenericUDAFEvaluator wrappedEvaluator
protected final WindowFrameDef winFrame
protected final PTFPartition partition
protected final List<PTFExpressionDef> parameters
protected final ObjectInspector outputOI
public BasePartitionEvaluator(GenericUDAFEvaluator wrappedEvaluator, WindowFrameDef winFrame, PTFPartition partition, List<PTFExpressionDef> parameters, ObjectInspector outputOI)
public Object getPartitionAgg() throws HiveException
HiveException
public Object iterate(int currentRow, LeadLagInfo leadLagInfo) throws HiveException
HiveException
protected Object calcFunctionValue(PTFPartition.PTFPartitionIterator<Object> pItr, LeadLagInfo leadLagInfo) throws HiveException
pItr
- the partition pointerHiveException
protected static BasePartitionEvaluator.Range getRange(WindowFrameDef winFrame, int currRow, PTFPartition p) throws HiveException
HiveException
Copyright © 2019 The Apache Software Foundation. All rights reserved.