use of com.sap.hadoop.windowing.functions2.table.npath.SymbolFunction.SymbolFunctionResult in project SQLWindowing by hbutani.
the class NPath method execute.
@Override
public void execute(PartitionIterator<Object> pItr, Partition outP) throws WindowingException {
while (pItr.hasNext()) {
Object iRow = pItr.next();
SymbolFunctionResult syFnRes = SymbolFunction.match(syFn, iRow, pItr);
if (syFnRes.matches) {
int sz = syFnRes.nextRow - (pItr.getIndex() - 1);
Object selectListInput = NPathUtils.getSelectListInput(iRow, tDef.getInput().getOI(), pItr, sz);
ArrayList<Object> oRow = new ArrayList<Object>();
for (ExprNodeEvaluator resExprEval : resultExprEvals) {
try {
oRow.add(resExprEval.evaluate(selectListInput));
} catch (HiveException he) {
throw new WindowingException(he);
}
}
outP.append(oRow);
}
}
}
Aggregations