Build MERGE plan.