*/
static Operator groupIndexCreationPlan(Schema schema, GroupIndex groupIndex) {
StoreGIMaintenance.BranchTables branchTables = branchTablesRootToLeaf(schema, groupIndex);
Operator plan = API.groupScan_Default(groupIndex.getGroup());
plan = API.filter_Default(plan, branchTables.fromRoot());
RowType parentRowType = null;
API.JoinType joinType = API.JoinType.RIGHT_JOIN;
EnumSet<API.FlattenOption> flattenOptions = EnumSet.noneOf(API.FlattenOption.class);
final API.JoinType withinGIJoin;
switch(groupIndex.getJoinType()) {
case LEFT: withinGIJoin = API.JoinType.LEFT_JOIN; break;