for (Term term : segment.getTerms()) {
if (term.getArrangement() != Arrangement.GROUPING) {
continue;
}
String name = ShuffleEmiterUtil.getPropertyName(segment, term);
Expression rhs = term.getSource().createValueDiff(
new ExpressionBuilder(factory, o1)
.field(name)
.toExpression(),
new ExpressionBuilder(factory, o2)
.field(name)
.toExpression());
cases.add(new ExpressionBuilder(factory, diff)
.assignFrom(rhs)
.toStatement());
cases.add(createDiff(diff));
}
cases.add(factory.newBreakStatement());
}
cases.add(factory.newSwitchDefaultLabel());
cases.add(createAssertionError());
statements.add(factory.newSwitchStatement(segmentId1, cases));
statements.add(new ExpressionBuilder(factory, diff)
.assignFrom(new ExpressionBuilder(factory, factory.newThis())
.method(ShuffleEmiterUtil.COMPARE_INT,
segmentId1,
segmentId2)
.toExpression())
.toStatement());
statements.add(createDiff(diff));
cases = Lists.create();
for (Segment segment : model.getSegments()) {
cases.add(factory.newSwitchCaseLabel(v(segment.getPortId())));
for (Term term : segment.getTerms()) {
if (term.getArrangement() == Arrangement.GROUPING) {
continue;
}
String name = ShuffleEmiterUtil.getPropertyName(segment, term);
Expression rhs = term.getSource().createValueDiff(
new ExpressionBuilder(factory, o1)
.field(name)
.toExpression(),
new ExpressionBuilder(factory, o2)
.field(name)