@Test
  public void testTableStatisticsOps() throws Exception {
    createPartitionedTable(true, true);

    List<ColumnStatistics> tabColStats;
    try (AutoCloseable c = deadline()) {
      tabColStats = objectStore.getTableColumnStatistics(DEFAULT_CATALOG_NAME, DB1, TABLE1,
          Arrays.asList("test_col1", "test_col2"));
    }
    Assert.assertEquals(0, tabColStats.size());

    ColumnStatisticsDesc statsDesc = new ColumnStatisticsDesc(true, DB1, TABLE1);
    ColumnStatisticsObj statsObj1 = new ColumnStatisticsObj("test_col1", "int",
        new ColumnStatisticsData(ColumnStatisticsData._Fields.DECIMAL_STATS, new DecimalColumnStatsData(100, 1000)));
    ColumnStatisticsObj statsObj2 = new ColumnStatisticsObj("test_col2", "int",
        new ColumnStatisticsData(ColumnStatisticsData._Fields.DECIMAL_STATS, new DecimalColumnStatsData(200, 2000)));
    ColumnStatistics colStats = new ColumnStatistics(statsDesc, Arrays.asList(statsObj1, statsObj2));
    colStats.setEngine(ENGINE);
    objectStore.updateTableColumnStatistics(colStats, null, 0);

    try (AutoCloseable c = deadline()) {
      tabColStats = objectStore.getTableColumnStatistics(DEFAULT_CATALOG_NAME, DB1, TABLE1,
          Arrays.asList("test_col1", "test_col2"));
    }
    Assert.assertEquals(1, tabColStats.size());
    Assert.assertEquals(2, tabColStats.get(0).getStatsObjSize());

    objectStore.deleteTableColumnStatistics(DEFAULT_CATALOG_NAME, DB1, TABLE1, "test_col1", ENGINE);
    try (AutoCloseable c = deadline()) {
      tabColStats = objectStore.getTableColumnStatistics(DEFAULT_CATALOG_NAME, DB1, TABLE1,
          Arrays.asList("test_col1", "test_col2"));
    }
    Assert.assertEquals(1, tabColStats.size());
    Assert.assertEquals(1, tabColStats.get(0).getStatsObjSize());

    objectStore.deleteTableColumnStatistics(DEFAULT_CATALOG_NAME, DB1, TABLE1, "test_col2", ENGINE);
    try (AutoCloseable c = deadline()) {
      tabColStats = objectStore.getTableColumnStatistics(DEFAULT_CATALOG_NAME, DB1, TABLE1,
          Arrays.asList("test_col1", "test_col2"));
    }
    Assert.assertEquals(0, tabColStats.size());
  }
Checks if the directSQL partition drop removes every connected data from the RDBMS tables.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java