docs: public void validateAndSetQuery() {
      if (aggregator == null || aggregator.isEmpty()) {
        throw new IllegalArgumentException("Missing the aggregation function");
      }
      try {
        agg = Aggregators.get(aggregator);
      } catch (NoSuchElementException nse) {
        throw new IllegalArgumentException(
            "No such aggregation function: " + aggregator);
      }
      
      // we must have at least one TSUID OR a metric
      if ((tsuids == null || tsuids.isEmpty()) && 
          (metric == null || metric.isEmpty())) {
        throw new IllegalArgumentException(
            "Missing the metric or tsuids, provide at least one");
      }
      
      // Make sure we have a filter list
      if (filters == null) {
        filters = new ArrayList<TagVFilter>();
      }
  
      // parse the downsampler if we have one
      if (downsample != null && !downsample.isEmpty()) {
        // downsampler given, so parse it
        downsample_specifier = new DownsamplingSpecification(downsample);
      } else {
        // no downsampler
        downsample_specifier = DownsamplingSpecification.NO_DOWNSAMPLER;
      }
      checkHistogramQuery();
    }