}
// set schemas
load1.setScriptSchema(org.apache.pig.newplan.logical.Util.translateSchema((inputSchema1))) ; ;
LOSort sort1 = new LOSort(plan) ;
// Create expression inner plan #1
LogicalExpressionPlan innerPlan1 = new LogicalExpressionPlan() ;
ProjectExpression project11 = new ProjectExpression(innerPlan1, 0, 0, sort1) ;
ProjectExpression project12 = new ProjectExpression(innerPlan1, 0, 1, sort1) ;
MultiplyExpression mul1 = new MultiplyExpression(innerPlan1, project11, project12) ;
// Create expression inner plan #2
LogicalExpressionPlan innerPlan2 = new LogicalExpressionPlan() ;
ProjectExpression project21 = new ProjectExpression(innerPlan2, 0, 0, sort1) ;
ConstantExpression const21 = new ConstantExpression(innerPlan2, 26L) ;
ModExpression mod21 = new ModExpression(innerPlan2, project21, const21) ;
// List of innerplans
List<LogicalExpressionPlan> innerPlans = new ArrayList<LogicalExpressionPlan>() ;
innerPlans.add(innerPlan1) ;
innerPlans.add(innerPlan2) ;
// List of ASC flags
List<Boolean> ascList = new ArrayList<Boolean>() ;
ascList.add(true);
ascList.add(true);
// Sort
sort1.setAscendingCols(ascList);
sort1.setSortColPlans(innerPlans);
plan.add(load1);
plan.add(sort1);
plan.connect(load1, sort1) ;
CompilationMessageCollector collector = new CompilationMessageCollector() ;
TypeCheckingRelVisitor typeChecker = new TypeCheckingRelVisitor(plan, collector);
typeChecker.visit();
printMessageCollector(collector) ;
//printTypeGraph(plan) ;
if (collector.hasError()) {
throw new AssertionError("Expect no error") ;
}
LogicalSchema endResultSchema = sort1.getSchema() ;
// outer
assertEquals(endResultSchema.getField(0).type, DataType.BYTEARRAY) ;
assertEquals(endResultSchema.getField(1).type, DataType.INTEGER) ;