ExpressionGenerators.field(oType, 0, 2), // oid
ExpressionGenerators.field(iType, 0, 5) // iid
);
Ordering ordering = API.ordering();
for(int i = 0; i < expList.size(); ++i) {
TPreparedExpression prep = expList.get(i).getTPreparedExpression();
ordering.append(ExpressionGenerators.field(prep.resultType(), i), true);
}
Operator plan = API.groupScan_Default(cType.table().getGroup());
plan = API.filter_Default(plan, Arrays.asList(cType, oType, iType));
plan = API.flatten_HKeyOrdered(plan, cType, oType, JoinType.LEFT_JOIN);
plan = API.flatten_HKeyOrdered(plan, plan.rowType(), iType, JoinType.LEFT_JOIN);