// Test different join keys
LogicalSchema jaschema6 = new LogicalSchema();
jaschema6.addField(new LogicalSchema.LogicalFieldSchema(
"x", null, DataType.INTEGER));
LOLoad A6 = new LOLoad(new FileSpec("/abc",
new FuncSpec("/fooload", new String[] {"x", "y"})), jaschema6, lp, null);
lp.add(A6);
// B = load
LogicalSchema jbschema6 = new LogicalSchema();
jbschema6.addField(new LogicalSchema.LogicalFieldSchema(
"y", null, DataType.INTEGER));
jbschema6.addField(new LogicalSchema.LogicalFieldSchema(
"z", null, DataType.LONG));
LOLoad B6 = new LOLoad(new FileSpec("/def",
new FuncSpec("PigStorage", "\t")), jbschema6, lp, null);
lp.add(B6);
// C = join
LogicalSchema jcschema6 = new LogicalSchema();
jcschema6.addField(new LogicalSchema.LogicalFieldSchema(
"x", null, DataType.INTEGER));
jcschema6.addField(new LogicalSchema.LogicalFieldSchema(
"y", null, DataType.INTEGER));
LogicalExpressionPlan aprojplan6 = new LogicalExpressionPlan();
new ProjectExpression(aprojplan6, 0, 0, null);
LogicalExpressionPlan bprojplan6 = new LogicalExpressionPlan();
new ProjectExpression(bprojplan6, 1, 0, null);
LogicalExpressionPlan b2projplan6 = new LogicalExpressionPlan();
new ProjectExpression(b2projplan6, 1, 1, null);
MultiMap<Integer, LogicalExpressionPlan> mm6 =
new MultiMap<Integer, LogicalExpressionPlan>();
mm6.put(0, aprojplan6);
mm6.put(1, bprojplan6);
mm6.put(1, b2projplan6);
LOJoin C6 = new LOJoin(lp, mm6, JOINTYPE.HASH, new boolean[] {true, true});
C6.neverUseForRealSetSchema(jcschema6);
lp.add(C6);
lp.connect(A6, C6);
lp.connect(B6, C6);
// Test different different number of join keys
LogicalSchema jaschema8 = new LogicalSchema();
jaschema8.addField(new LogicalSchema.LogicalFieldSchema(
"x", null, DataType.INTEGER));
LOLoad A8 = new LOLoad(new FileSpec("/abc",
new FuncSpec("/fooload", new String[] {"x", "y"})), jaschema8, lp, null);
lp.add(A8);
// B = load
LogicalSchema jbschema8 = new LogicalSchema();
jbschema8.addField(new LogicalSchema.LogicalFieldSchema(
"y", null, DataType.INTEGER));
jbschema8.addField(new LogicalSchema.LogicalFieldSchema(
"z", null, DataType.LONG));
LOLoad B8 = new LOLoad(new FileSpec("/def",
new FuncSpec("PigStorage", "\t")), jbschema8, lp, null);
lp.add(B8);
// C = join
LogicalSchema jcschema8 = new LogicalSchema();