use of org.apache.hyracks.algebricks.runtime.base.IPushRuntimeFactory in project asterixdb by apache.
the class SubplanRuntimeFactory method toString.
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("Subplan { \n");
for (IPushRuntimeFactory f : pipeline.getRuntimeFactories()) {
sb.append(" " + f.toString() + ";\n");
}
sb.append("}");
return sb.toString();
}
use of org.apache.hyracks.algebricks.runtime.base.IPushRuntimeFactory in project asterixdb by apache.
the class NestedPlansAccumulatingAggregatorFactory method assemblePipeline.
private IFrameWriter assemblePipeline(AlgebricksPipeline subplan, IFrameWriter writer, IHyracksTaskContext ctx) throws HyracksDataException {
// plug the operators
IFrameWriter start = writer;
IPushRuntimeFactory[] runtimeFactories = subplan.getRuntimeFactories();
RecordDescriptor[] recordDescriptors = subplan.getRecordDescriptors();
for (int i = runtimeFactories.length - 1; i >= 0; i--) {
IPushRuntime newRuntime = runtimeFactories[i].createPushRuntime(ctx);
newRuntime.setFrameWriter(0, start, recordDescriptors[i]);
if (i > 0) {
newRuntime.setInputRecordDescriptor(0, recordDescriptors[i - 1]);
} else {
// the nts has the same input and output rec. desc.
newRuntime.setInputRecordDescriptor(0, recordDescriptors[0]);
}
start = newRuntime;
}
return start;
}
Aggregations