public void initialize(Configuration cfg, PTFDesc ptfDesc, PartitionedTableFunctionDef tDef, TableFunctionEvaluator evaluator)
      throws HiveException {
    this.evaluator = evaluator;
    this.ptfDesc = ptfDesc;
    evaluator.setTableDef(tDef);
    evaluator.setQueryDef(ptfDesc);
    evaluator.setNullsLast(HiveConf.getBoolVar(cfg, HiveConf.ConfVars.HIVE_DEFAULT_NULLS_LAST));
  }
Based on Hive {@link GenericUDAFResolver}. Break up the responsibility of the
old AbstractTableFunction class into a Resolver and Evaluator.
The Resolver is responsible for:
<ol>
<li> setting up the {@link TableFunctionEvaluator}
<li> Setting up the The raw and output ObjectInspectors of the Evaluator.
<li> The Evaluator also holds onto the {@link PartitionedTableFunctionDef}. This provides information
about the arguments to the function, the shape of the Input partition and the Partitioning details.
</ol>
The Resolver for a function is obtained from the {@link FunctionRegistry}. The Resolver is initialized
by the following 4 step process:
<ol>
<li> The initialize method is called; which is passed the {@link PTFDesc} and the {@link PartitionedTableFunctionDef}.
<li> The resolver is then asked to setup the Raw ObjectInspector. This is only required if the Function reshapes
the raw input.
<li> Once the Resolver has had a chance to compute the shape of the Raw Input that is fed to the partitioning
machinery; the translator sets up the partitioning details on the tableFuncDef.
<li> finally the resolver is asked to setup the output ObjectInspector.
</ol>
ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/TableFunctionResolver.java