// Add the constraint linking the parent query with the subquery.
for (int i = 0; i < localFields.size(); i++) {
LocalFieldDesc la = (LocalFieldDesc) localFields.get(i);
LocalFieldDesc fa = (LocalFieldDesc) foreignFields.get(i);
ConstraintFieldDesc lcfd = new ConstraintFieldDesc(la, parentPlan);
ConstraintFieldDesc fcfd = new ConstraintFieldDesc(fa, this);
constraint.addField(lcfd);
constraint.addField(fcfd);
// Subqueries always join via equijoin.
constraint.addOperation(ActionDesc.OP_EQ);