* descriptor with the current plan.
*
* @param foreignPlan Query plan to be joined.
*/
private void mergeResultDesc(SelectQueryPlan foreignPlan) {
ResultDesc foreignResult = foreignPlan.resultDesc;
if (resultDesc != null && foreignResult != null) {
resultDesc.doJoin(foreignResult, foreignPlan.parentField);
} else if (resultDesc == null) {
resultDesc = foreignResult;