physOp.setLineageTracer(lineage);
// replace the original inputs by POReads
for (int i = 0; i < inputs.size(); i++) {
DataBag bag = derivedData.get(cg.getInputs().get(i));
PORead por = new PORead(new OperatorKey("", r.nextLong()), bag);
phy.add(por);
try {
phy.connect(por, physOp.getInputs().get(i));
} catch (PlanException e) {
// TODO Auto-generated catch block
e.printStackTrace();
log.error("Error connecting " + por.name() + " to "
+ physOp.name());
}
}
DataBag output = BagFactory.getInstance().newDefaultBag();