public abstract class TableFunctionResolver extends Object
GenericUDAFResolver
. Break up the responsibility of the
old AbstractTableFunction class into a Resolver and Evaluator.
The Resolver is responsible for:
tableFunctionEvaluator
TableFunctionDef
. This provides information
about the arguments to the function, the shape of the Input partition and the Partitioning details.
FunctionRegistry
. The Resolver is initialized
by the following 4 step process:
PTFDesc
and the TableFunctionDef
.
Constructor and Description |
---|
TableFunctionResolver() |
Modifier and Type | Method and Description |
---|---|
boolean |
carryForwardNames() |
protected abstract TableFunctionEvaluator |
createEvaluator(PTFDesc ptfDesc,
PartitionedTableFunctionDef tDef) |
TableFunctionEvaluator |
getEvaluator() |
abstract List<String> |
getOutputColumnNames() |
PTFDesc |
getPtfDesc() |
List<String> |
getRawInputColumnNames() |
List<String> |
getReferencedColumns()
Provide referenced columns names to be used in partition function
|
void |
initialize(HiveConf cfg,
PTFDesc ptfDesc,
PartitionedTableFunctionDef tDef) |
void |
initialize(PTFDesc ptfDesc,
PartitionedTableFunctionDef tDef,
TableFunctionEvaluator evaluator) |
abstract void |
initializeOutputOI()
This method is invoked during runtime(during deserialization of theQueryDef).
|
void |
initializeRawInputOI() |
protected void |
setOutputOI(StructObjectInspector outputOI) |
protected void |
setRawInputOI(StructObjectInspector rawInputOI) |
abstract void |
setupOutputOI() |
void |
setupRawInputOI() |
abstract boolean |
transformsRawInput() |
public void initialize(HiveConf cfg, PTFDesc ptfDesc, PartitionedTableFunctionDef tDef) throws SemanticException
SemanticException
public void initialize(PTFDesc ptfDesc, PartitionedTableFunctionDef tDef, TableFunctionEvaluator evaluator) throws HiveException
HiveException
public TableFunctionEvaluator getEvaluator()
public abstract void setupOutputOI() throws SemanticException
SemanticException
public abstract List<String> getOutputColumnNames() throws SemanticException
SemanticException
public abstract void initializeOutputOI() throws HiveException
Expression Nodes
exist for all the Def (ArgDef, ColumnDef, WindowDef..). It is the responsibility of
the TableFunction to construct the evaluators
and setup the OI.tblFuncDef
- ptfDesc
- HiveException
public void setupRawInputOI() throws SemanticException
SemanticException
public List<String> getRawInputColumnNames() throws SemanticException
SemanticException
public void initializeRawInputOI() throws HiveException
HiveException
protected void setRawInputOI(StructObjectInspector rawInputOI)
protected void setOutputOI(StructObjectInspector outputOI)
public PTFDesc getPtfDesc()
public boolean carryForwardNames()
public abstract boolean transformsRawInput()
protected abstract TableFunctionEvaluator createEvaluator(PTFDesc ptfDesc, PartitionedTableFunctionDef tDef)
public List<String> getReferencedColumns() throws SemanticException
SemanticException
Copyright © 2017 The Apache Software Foundation. All rights reserved.