use of org.apache.hyracks.algebricks.data.IPrinterFactoryProvider in project asterixdb by apache.
the class JobGenHelper method mkPrinterFactories.
public static IPrinterFactory[] mkPrinterFactories(IOperatorSchema opSchema, IVariableTypeEnvironment env, JobGenContext context, int[] printColumns) throws AlgebricksException {
IPrinterFactory[] pf = new IPrinterFactory[printColumns.length];
IPrinterFactoryProvider pff = context.getPrinterFactoryProvider();
try {
for (int i = 0; i < pf.length; i++) {
LogicalVariable v = opSchema.getVariable(printColumns[i]);
Object t = env.getVarType(v);
pf[i] = pff.getPrinterFactory(t);
}
return pf;
} catch (HyracksDataException e) {
throw new AlgebricksException(e);
}
}
Aggregations