docs: public void transformDownSamplerToRollupQuery(final Aggregator group_by, 
        final String str_interval)  {
      
      if (downsampler != null && downsampler.getInterval() > 0) {
        if (tsdb.getRollupConfig() != null) {
          try {
            best_match_rollups = tsdb.getRollupConfig().
                getRollupInterval(downsampler.getInterval() / 1000, str_interval);
            //It is thread safe as each thread will be working on unique 
            // TsdbQuery object
            //RollupConfig.getRollupInterval guarantees that, 
            //  it always return a non-empty list
            // TODO
            rollup_query = new RollupQuery(best_match_rollups.remove(0), 
                    downsampler.getFunction(), downsampler.getInterval(),
                    group_by);
            if (group_by == Aggregators.COUNT) {
              aggregator = Aggregators.SUM;
            }
          }
          catch (NoSuchRollupForIntervalException nre) {
            LOG.error("There is no such rollup for the downsample interval "
              + str_interval + ". So fall back to the  default tsdb down"
              + " sampling approach and it requires raw data scan." );
            //nullify the rollup_query if this api is called explicitly
            rollup_query = null;
            return;
          }
          
          if (rollup_query.getRollupInterval().isDefaultInterval()) {
            //Anyways it is a scan on raw data
            rollup_query = null;
          }
        }       
      }
    }