function checkAggregators(invalidAggregators, validAggregators, table) {
  invalidAggregators.forEach(function(aggregator) {
    var buildQuery = function() {
      return new lf.query.SelectBuilder(
          hr.db.getGlobal(), [aggregator]).from(table);
    };
    // 527: Invalid aggregation detected: {0}.
    lf.testing.util.assertThrowsError(527, buildQuery);
  });

  validAggregators.forEach(function(aggregator) {
    var buildQuery = function() {
      return new lf.query.SelectBuilder(
          hr.db.getGlobal(), [aggregator]).from(table);
    };
    assertNotThrows(buildQuery);
  });
}
Checks a list of aggregators for validity.
@param {!Array<!lf.fn.AggregatedColumn>} invalidAggregators Aggregators
    expected to fail the validity check.
@param {!Array<!lf.fn.AggregatedColumn>} validAggregators Aggregators
    expected to pass the validity check.
@param {!lf.schema.Table} table