IndexRowType indexType = schema.indexRowType(pkey.getIndex());
return generateBranchPlan(table, indexScan, indexType);
}
public static Operator generateBranchPlan (Table table, Operator scan, RowType scanType) {
final Schema schema = (Schema)scanType.schema();
final TableRowType tableType = schema.tableRowType(table);
final List<TableRowType> tableTypes = new ArrayList<>();
tableTypes.add(tableType);
for (RowType rowType : Schema.descendentTypes(tableType, schema.userTableTypes())) {
tableTypes.add((TableRowType)rowType);
}
Operator plan = API.groupLookup_Default(scan, table.getGroup(),
scanType, tableTypes,
API.InputPreservationOption.DISCARD_INPUT, 1);