Index.JoinType giJoin = groupIndex.getJoinType();
switch (giJoin) {
case LEFT:
if (row.rowType().equals(storePlan.leftHalf) && useInvertType(action, context, bindings) &&
!skipCascadeRow(action, row, handler)) {
Row outerRow = new FlattenedRow(storePlan.topLevelFlattenType, row, null, row.hKey());
doAction(invert(action), handler, outerRow);
actioned = true;
}
break;
case RIGHT:
if (row.rowType().equals(storePlan.rightHalf) && useInvertType(action, context, bindings) &&
!skipCascadeRow(action, row, handler)) {
Row outerRow = new FlattenedRow(storePlan.topLevelFlattenType, null, row, row.hKey());
doAction(invert(action), handler, outerRow);
actioned = true;
}
break;
default: throw new AssertionError(giJoin.name());
}
}
else {
// Hkey cleanup. Look for the right half.
if (row.rowType().equals(storePlan.rightHalf) && !skipCascadeRow(action, row, handler)) {
Row outerRow = new FlattenedRow(storePlan.topLevelFlattenType, null, row, row.hKey());
doAction(invert(action), handler, outerRow);
actioned = true;
}
}
if (!actioned) {