/*************************************************************************************
* SELECT clause - Final Aggregation
*************************************************************************************/
private int processSelectClause(List<SelectItem> selectItems) {
final IndexSelectItemsVisitor selectVisitor = new IndexSelectItemsVisitor(
_cg.getQueryPlan(), _schema, _pq.getTan(), _map);
for (final SelectItem elem : selectItems)
elem.accept(selectVisitor);
final List<AggregateOperator> aggOps = selectVisitor.getAggOps();
final List<ValueExpression> groupByVEs = selectVisitor.getGroupByVEs();
final Component affectedComponent = _cg.getQueryPlan().getLastComponent();
attachSelectClause(affectedComponent, aggOps, groupByVEs);
return (aggOps.isEmpty() ? IndexSelectItemsVisitor.NON_AGG : IndexSelectItemsVisitor.AGG);
}