@Override public RelNode visit(HiveAggregate rel) {
      // if there are aggregate functions or grouping sets we will need
      // value generator
      if(rel.getAggCallList().isEmpty() && !rel.indicator) {
        this.mightRequireValueGen = false;
        return super.visit(rel);
      } else {
        // need to reset to true in case previous aggregate/project
        // has set it to false
        this.mightRequireValueGen = true;
        return rel;
      }
    }
Returns whether there are any correlating variables in this statement.

@return whether there are any correlating variables
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveRelDecorrelator.java