org.apache.hadoop.hive.ql.udf.ptf
Class TableFunctionEvaluator
java.lang.Object
org.apache.hadoop.hive.ql.udf.ptf.TableFunctionEvaluator
- Direct Known Subclasses:
- Noop, WindowingTableFunction
public abstract class TableFunctionEvaluator
- extends Object
Based on Hive GenericUDAFEvaluator
. Break up the responsibility of the old AsbtractTableFunction
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:
- execute: which is invoked after the input is partitioned; the contract
is, it is given an input Partition and must return an output Partition. The shape of the output
Partition is obtained from the getOutputOI call.
- transformRawInput: In the case where this function indicates that it will transform the raw input
before it is fed through the partitioning mechanics, this function is called. Again the contract is
t is given an input Partition and must return an Partition. The shape of the output Partition is
obtained from getRawInputOI() call.
TableFunctionEvaluator
public TableFunctionEvaluator()
getOutputOI
public StructObjectInspector getOutputOI()
getTableDef
public PartitionedTableFunctionDef getTableDef()
setTableDef
public void setTableDef(PartitionedTableFunctionDef tDef)
getRawInputOI
public StructObjectInspector getRawInputOI()
isTransformsRawInput
public boolean isTransformsRawInput()
setTransformsRawInput
public void setTransformsRawInput(boolean transformsRawInput)
execute
public PTFPartition execute(PTFPartition iPart)
throws HiveException
- Throws:
HiveException
transformRawInput
public PTFPartition transformRawInput(PTFPartition iPart)
throws HiveException
- Throws:
HiveException
close
public void close()
Copyright © 2014 The Apache Software Foundation. All rights reserved.