public static void assertEqualStatistics(ColumnStatisticsData expected, ColumnStatisticsData computed) {
    if (expected.getSetField() != computed.getSetField()) {
      throw new IllegalArgumentException("Expected data is of type " + expected.getSetField()
          + " while computed data is of type " + computed.getSetField());
    }

    Class<?> dataClass;
    switch (expected.getSetField()) {
    case DATE_STATS:
      dataClass = DateColumnStatsData.class;
      break;
    case LONG_STATS:
      dataClass = LongColumnStatsData.class;
      break;
    case DOUBLE_STATS:
      dataClass = DoubleColumnStatsData.class;
      break;
    case DECIMAL_STATS:
      dataClass = DecimalColumnStatsData.class;
      break;
    case TIMESTAMP_STATS:
      dataClass = TimestampColumnStatsData.class;
      break;
    default:
      // it's an unsupported class for KLL, no special treatment needed
      Assert.assertEquals(expected, computed);
      return;
    }
    assertEqualStatistics(expected, computed, dataClass);
  }
Checks if expected and computed statistics data are equal.
@param expected expected statistics data
@param computed computed statistics data
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/StatisticsTestUtils.java