code: public static Collection<DimensionSpec> extractionsToRewrite(GroupByQuery query)
    {
      return Collections2.filter(
          query.getDimensions(), new Predicate<DimensionSpec>()
          {
            @Override
            public boolean apply(DimensionSpec input)
            {
              return input.getExtractionFn() != null
                     && ExtractionFn.ExtractionType.ONE_TO_ONE.equals(
                  input.getExtractionFn().getExtractionType()
              );
            }
          }
      );
    }
docs: This function checks the query for dimensions which can be optimized by applying the dimension extraction
  as the final step of the query instead of on every event.
  
  @param query The query to check for optimizations
  
  @return A collection of DimensionsSpec which can be extracted at the last second upon query completion.