class MetastoreHiveStatisticsProvider implements HiveStatisticsProvider {

    @VisibleForTesting
    static Estimate calculateDataSizeForPartitioningKey(
            HiveColumnHandle column,
            Type type,
            List<HivePartition> partitions,
            Map<String, PartitionStatistics> statistics,
            double averageRowsPerPartition)
    {
        if (!hasDataSize(type)) {
            return Estimate.unknown();
        }
        double dataSize = 0;
        for (HivePartition partition : partitions) {
            int length = getSize(partition.getKeys().get(column));
            double rowCount = getPartitionRowCount(partition.getPartitionId(), statistics).orElse(averageRowsPerPartition);
            dataSize += length * rowCount;
        }
        return Estimate.of(dataSize);
    }

    public  MetastoreHiveStatisticsProvider(SemiTransactionalHiveMetastore metastore);
    @VisibleForTesting  MetastoreHiveStatisticsProvider(PartitionsStatisticsProvider statisticsProvider);

}