protected List<DistributionField> getDistributionField(DrillAggregateRel rel, boolean allFields) {
List<DistributionField> groupByFields = Lists.newArrayList();
for (int group : BitSets.toIter(rel.getGroupSet())) {
DistributionField field = new DistributionField(group);
groupByFields.add(field);
if (!allFields && groupByFields.size() == 1) {
// if we are only interested in 1 grouping field, pick the first one for now..
// but once we have num distinct values (NDV) statistics, we should pick the one