use of org.apache.hadoop.hive.ql.plan.ptf.PTFQueryInputDef in project hive by apache.
the class PTFDeserializer method initializePTFChain.
public void initializePTFChain(PartitionedTableFunctionDef tblFnDef) throws HiveException {
Deque<PTFInputDef> ptfChain = new ArrayDeque<PTFInputDef>();
PTFInputDef currentDef = tblFnDef;
while (currentDef != null) {
ptfChain.push(currentDef);
currentDef = currentDef.getInput();
}
while (!ptfChain.isEmpty()) {
currentDef = ptfChain.pop();
if (currentDef instanceof PTFQueryInputDef) {
initialize((PTFQueryInputDef) currentDef, inputOI);
} else if (currentDef instanceof WindowTableFunctionDef) {
initializeWindowing((WindowTableFunctionDef) currentDef);
} else {
initialize((PartitionedTableFunctionDef) currentDef);
}
}
PTFDeserializer.alterOutputOIForStreaming(ptfDesc);
}
use of org.apache.hadoop.hive.ql.plan.ptf.PTFQueryInputDef in project hive by apache.
the class PTFTranslator method translate.
private PTFQueryInputDef translate(PTFQueryInputSpec spec, int inpNum) throws SemanticException {
PTFQueryInputDef def = new PTFQueryInputDef();
StructObjectInspector oi = PTFTranslator.getStandardStructOI(inputRR);
ShapeDetails shp = setupShape(oi, null, inputRR);
def.setOutputShape(shp);
def.setType(spec.getType());
def.setAlias(spec.getSource() == null ? "ptf_" + inpNum : spec.getSource());
return def;
}
Aggregations