ordinaryExprs = new ArrayList<Expr>();
}
Collections.addAll(ordinaryExprs, getRowValuePredicandsFromOrdinaryGroupingSet(element.ordinary_grouping_set()));
} else if (element.rollup_list() != null) {
groupSize++;
groups.add(new GroupElement(GroupType.Rollup,
getRowValuePredicandsFromOrdinaryGroupingSetList(element.rollup_list().c)));
} else if (element.cube_list() != null) {
groupSize++;
groups.add(new GroupElement(GroupType.Cube,
getRowValuePredicandsFromOrdinaryGroupingSetList(element.cube_list().c)));
}
}
if (ordinaryExprs != null) {
groups.set(0, new GroupElement(GroupType.OrdinaryGroup, ordinaryExprs.toArray(new Expr[ordinaryExprs.size()])));
clause.setGroups(groups.subList(0, groupSize).toArray(new GroupElement[groupSize]));
} else if (groupSize > 1) {
clause.setGroups(groups.subList(1, groupSize).toArray(new GroupElement[groupSize - 1]));
}
}