org.apache.hadoop.hive.ql.udf.ptf
Class TableFunctionEvaluator

java.lang.Object
  extended by 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:

  1. 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.
  2. 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.


Constructor Summary
TableFunctionEvaluator()
           
 
Method Summary
 void close()
           
 PTFPartition execute(PTFPartition iPart)
           
 StructObjectInspector getOutputOI()
           
 StructObjectInspector getRawInputOI()
           
 PartitionedTableFunctionDef getTableDef()
           
 boolean isTransformsRawInput()
           
 void setTableDef(PartitionedTableFunctionDef tDef)
           
 void setTransformsRawInput(boolean transformsRawInput)
           
 PTFPartition transformRawInput(PTFPartition iPart)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableFunctionEvaluator

public TableFunctionEvaluator()
Method Detail

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.