result.addColumn(groupFunction.getColumnId(), ColumnType.NUMBER);
}
// Add the aggregate calculations to the result.
List<DataSetIntervalIndex> intervalIdxs = index.getIntervalIndexes();
for (int i=0; i<intervalIdxs.size(); i++) {
DataSetIntervalIndex intervalIdx = intervalIdxs.get(i);
result.setValueAt(i, 0, intervalIdx.getName());
// Add the aggregate calculations.
for (int j=0; j< groupFunctions.size(); j++) {
GroupFunction groupFunction = groupFunctions.get(j);
DataColumn dataColumn = dataSet.getColumnById(groupFunction.getSourceId());