Fix failing test in TestHiveClient
`fileCount` and `rawSize` statistics are computed on the fly, thus cannot be erased
@@ -3088,7 +3088,9 @@ public abstract class AbstractTestHiveClient
for (String partitionName : partitionNames) {
HiveBasicStatistics statistics = getBasicStatisticsForPartition(transaction, tableName, dsColumn, partitionName);
- assertStatisticsAreNotPresent(statistics);
+ assertThat(statistics.getRowCount()).isNotPresent();
+ assertThat(statistics.getInMemoryDataSizeInBytes()).isNotPresent();
+ // fileCount and rawSize statistics are computed on the fly by the metastore, thus cannot be erased
}
}
}
@@ -3150,14 +3152,6 @@ public abstract class AbstractTestHiveClient
.collect(toImmutableMap(Map.Entry::getKey, Map.Entry::getValue));
}
- private static void assertStatisticsAreNotPresent(HiveBasicStatistics statistics)
- {
- assertThat(statistics.getRowCount()).isNotPresent();
- assertThat(statistics.getFileCount()).isNotPresent();
- assertThat(statistics.getOnDiskDataSizeInBytes()).isNotPresent();
- assertThat(statistics.getInMemoryDataSizeInBytes()).isNotPresent();
- }
-
/**
* @return query id
*/
