test_class.file: tajo-catalog/tajo-catalog-common/src/test/java/org/apache/tajo/catalog/statistics/TestStatisticsUtil.java
test_class.identifier: TestStatisticsUtil
test_case.body: @Test
    public void testEmptyAggregate() {
      TableStats stat1 = new TableStats();
      TableStats stat2 = new TableStats();
      TableStats stat3 = new TableStats();
  
      assertNotNull(StatisticsUtil.aggregateTableStat(
          Lists.newArrayList(stat1, stat2, stat3)));
    }
test_case.class_method_signature: TestStatisticsUtil.testEmptyAggregate()
test_case.full_signature: @Test public void testEmptyAggregate()
test_case.identifier: testEmptyAggregate
test_case.invocations: assertNotNull aggregateTableStat newArrayList
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEmptyAggregate()
focal_class.declarator: LOG = LogFactory.getLog(StatisticsUtil.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Log LOG = LogFactory.getLog(StatisticsUtil.class);
focal_class.type: Log
focal_class.var_name: LOG
focal_class.file: tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/statistics/StatisticsUtil.java
focal_class.identifier: StatisticsUtil
focal_class.class_method_signature: StatisticsUtil.aggregateStatSet(List<StatSet> statSets)
focal_class.full_signature: public static StatSet aggregateStatSet(List<StatSet> statSets)
focal_class.identifier: aggregateStatSet
focal_class.modifiers: public static
focal_class.parameters: (List<StatSet> statSets)
focal_class.return: StatSet
focal_class.signature: StatSet aggregateStatSet(List<StatSet> statSets)
focal_class.class_method_signature: StatisticsUtil.aggregateTableStat(TableStats result, TableStats stats)
focal_class.full_signature: public static void aggregateTableStat(TableStats result, TableStats stats)
focal_class.identifier: aggregateTableStat
focal_class.modifiers: public static
focal_class.parameters: (TableStats result, TableStats stats)
focal_class.return: void
focal_class.signature: void aggregateTableStat(TableStats result, TableStats stats)
focal_class.class_method_signature: StatisticsUtil.aggregateTableStat(List<TableStats> tableStatses)
focal_class.full_signature: public static TableStats aggregateTableStat(List<TableStats> tableStatses)
focal_class.identifier: aggregateTableStat
focal_class.modifiers: public static
focal_class.parameters: (List<TableStats> tableStatses)
focal_class.return: TableStats
focal_class.signature: TableStats aggregateTableStat(List<TableStats> tableStatses)
focal_method.body: public static void aggregateTableStat(TableStats result, TableStats stats) {
  
      if (stats.getColumnStats().size() > 0) {
        if (result.getColumnStats().size() == 0) {
          for (int i = 0; i < stats.getColumnStats().size(); i++) {
            result.addColumnStat(stats.getColumnStats().get(i));
          }
        } else {
          // aggregate column stats for each table
          for (int i = 0; i < stats.getColumnStats().size(); i++) {
            ColumnStats cs = stats.getColumnStats().get(i);
            ColumnStats agg = result.getColumnStats().get(i);
            if (cs == null) {
              LOG.warn("ERROR: One of column stats is NULL (expected column: " + agg.getColumn() + ")");
              continue;
            }
  
            agg.setNumDistVals(agg.getNumDistValues() + cs.getNumDistValues());
            agg.setNumNulls(agg.getNumNulls() + cs.getNumNulls());
            if (!cs.minIsNotSet() && (agg.minIsNotSet() ||
                agg.getMinValue().compareTo(cs.getMinValue()) > 0)) {
              agg.setMinValue(cs.getMinValue());
            }
            if (!cs.maxIsNotSet() && (agg.maxIsNotSet() ||
                agg.getMaxValue().compareTo(cs.getMaxValue()) < 0)) {
              agg.setMaxValue(stats.getColumnStats().get(i).getMaxValue());
            }
          }
        }
      }
  
      result.setNumRows(result.getNumRows() + stats.getNumRows());
      result.setNumBytes(result.getNumBytes() + stats.getNumBytes());
      result.setReadBytes(result.getReadBytes() + stats.getReadBytes());
      result.setNumBlocks(result.getNumBlocks() + stats.getNumBlocks());
      result.setNumShuffleOutputs(result.getNumShuffleOutputs() + stats.getNumShuffleOutputs());
    }
focal_method.class_method_signature: StatisticsUtil.aggregateTableStat(TableStats result, TableStats stats)
focal_method.full_signature: public static void aggregateTableStat(TableStats result, TableStats stats)
focal_method.identifier: aggregateTableStat
focal_method.invocations: size getColumnStats size getColumnStats size getColumnStats addColumnStat get getColumnStats size getColumnStats get getColumnStats get getColumnStats warn getColumn setNumDistVals getNumDistValues getNumDistValues setNumNulls getNumNulls getNumNulls minIsNotSet minIsNotSet compareTo getMinValue getMinValue setMinValue getMinValue maxIsNotSet maxIsNotSet compareTo getMaxValue getMaxValue setMaxValue getMaxValue get getColumnStats setNumRows getNumRows getNumRows setNumBytes getNumBytes getNumBytes setReadBytes getReadBytes getReadBytes setNumBlocks getNumBlocks getNumBlocks setNumShuffleOutputs getNumShuffleOutputs getNumShuffleOutputs
focal_method.modifiers: public static
focal_method.parameters: (TableStats result, TableStats stats)
focal_method.return: void
focal_method.signature: void aggregateTableStat(TableStats result, TableStats stats)