*
* @throws IOException
*/
@Test
public void testJoinInputOrder() throws IOException {
LogicalPlanTester lpt = new LogicalPlanTester( pc );
lpt.buildPlan( "l1 = load 'y' as (a);" );
lpt.buildPlan( "l2 = load 'z' as (a1,b1,c1,d1);" );
lpt.buildPlan( "f1 = foreach l2 generate a1, b1, c1, d1;" );
lpt.buildPlan( "f2 = foreach f1 generate a1, b1, c1;" );
lpt.buildPlan( "j1 = join f2 by a1, l1 by a using 'replicated';" );
org.apache.pig.impl.logicalLayer.LogicalPlan plan = lpt.buildPlan( "store j1 into 'empty';" );
LogicalPlan newLogicalPlan = migratePlan( plan );
int forEachCount1 = getForEachOperatorCount( newLogicalPlan );
int outputExprCount1 = getOutputExprCount( newLogicalPlan );