docs: @VisibleForTesting
    GroupByQuery rewriteNestedQueryForPushDown(GroupByQuery query)
    {
      return query.withAggregatorSpecs(Lists.transform(query.getAggregatorSpecs(), (agg) -> agg.getCombiningFactory()))
                  .withDimensionSpecs(Lists.transform(
                      query.getDimensions(),
                      (dim) -> new DefaultDimensionSpec(
                          dim.getOutputName(),
                          dim.getOutputName(),
                          dim.getOutputType()
                      )
                  ));
    }