public abstract class TableFunctionEvaluator extends Object
GenericUDAFEvaluator
. Break up the responsibility of the old AbstractTableFunction
class into a Resolver and Evaluator.
The Evaluator also holds onto the TableFunctionDef
. This provides information
about the arguments to the function, the shape of the Input partition and the Partitioning details.
The Evaluator is responsible for providing the 2 execute methods:
Modifier and Type | Field and Description |
---|---|
protected boolean |
canAcceptInputAsStream |
protected StructObjectInspector |
OI |
protected PTFPartition |
outputPartition |
protected PTFDesc |
ptfDesc |
protected StructObjectInspector |
rawInputOI |
protected PartitionedTableFunctionDef |
tableDef |
Constructor and Description |
---|
TableFunctionEvaluator() |
protected transient StructObjectInspector OI
protected transient StructObjectInspector rawInputOI
protected PartitionedTableFunctionDef tableDef
protected PTFDesc ptfDesc
protected transient PTFPartition outputPartition
protected transient boolean canAcceptInputAsStream
public StructObjectInspector getOutputOI()
protected void setOutputOI(StructObjectInspector outputOI)
public PartitionedTableFunctionDef getTableDef()
public void setTableDef(PartitionedTableFunctionDef tDef)
protected PTFDesc getQueryDef()
protected void setQueryDef(PTFDesc ptfDesc)
public StructObjectInspector getRawInputOI()
protected void setRawInputOI(StructObjectInspector rawInputOI)
public boolean isTransformsRawInput()
public void setTransformsRawInput(boolean transformsRawInput)
public PTFPartition execute(PTFPartition iPart) throws HiveException
HiveException
protected abstract void execute(PTFPartition.PTFPartitionIterator<Object> pItr, PTFPartition oPart) throws HiveException
HiveException
protected PTFPartition transformRawInput(PTFPartition iPart) throws HiveException
HiveException
protected PTFPartition _transformRawInput(PTFPartition iPart) throws HiveException
HiveException
public boolean canIterateOutput()
public Iterator<Object> iterator(PTFPartition.PTFPartitionIterator<Object> pItr) throws HiveException
HiveException
protected Iterator<Object> transformRawInputIterator(PTFPartition.PTFPartitionIterator<Object> pItr) throws HiveException
HiveException
public boolean canAcceptInputAsStream()
public void initializeStreaming(org.apache.hadoop.conf.Configuration cfg, StructObjectInspector inputOI, boolean isMapSide) throws HiveException
HiveException
public void startPartition() throws HiveException
HiveException
public List<Object> processRow(Object row) throws HiveException
HiveException
public List<Object> finishPartition() throws HiveException
HiveException
public void close()
Copyright © 2017 The Apache Software Foundation. All rights reserved.