@Override
  public void run()
      throws InvalidInputException {
    String tableType = _input.getTableType();
    if ((tableType.equalsIgnoreCase(REALTIME) || tableType.equalsIgnoreCase(HYBRID))) {
      _output.setAggregateMetrics(shouldAggregate(_input));
    }
  }
@Test
  public void testRunComplexExpressionInSumWithSomeNonMetricColumns()
      throws Exception {
    Set<String> metrics = ImmutableSet.of("a", "b", "c");
    InputManager input = createInput(metrics, "select sum(a), sum(b), sum(2 * a + 3 * b + X) from tableT");
    ConfigManager output = new ConfigManager();
    AggregateMetricsRule rule = new AggregateMetricsRule(input, output);
    rule.run();
    assertFalse(output.isAggregateMetrics());
  }