// Get the uid for this projection. It must match the uid of the
// value it is projecting.
long myUid = p.getFieldSchema().uid;
// Find the operator this projection references
LogicalRelationalOperator pred = p.findReferent();
if (p.getAttachedRelationalOp() instanceof LOGenerate && p.getPlan().getSuccessors(p)==null) {
// No need to adjust
return;
}
else {
// Get the schema for this operator and search it for the matching uid
int match = -1;
LogicalSchema schema = pred.getSchema();
if (schema==null)
return;
List<LogicalSchema.LogicalFieldSchema> fields = schema.getFields();
for (int i = 0; i < fields.size(); i++) {
if (fields.get(i).uid == myUid) {