grouping_element().size()];
for (int i = 0; i < groups.length; i++) {
SQLParser.Grouping_elementContext element =
ctx.grouping_element_list().grouping_element().get(i);
if (element.ordinary_grouping_set() != null) {
groups[i] = new GroupElement(GroupType.OrdinaryGroup,
getColumnReferences(element.ordinary_grouping_set().column_reference_list()));
} else if (element.rollup_list() != null) {
groups[i] = new GroupElement(GroupType.Rollup,
getColumnReferences(element.rollup_list().c.column_reference_list()));
} else if (element.cube_list() != null) {
groups[i] = new GroupElement(GroupType.Cube,
getColumnReferences(element.cube_list().c.column_reference_list()));
}
}
clause.setGroups(groups);
}