presto-tpch/src/main/java/io/prestosql/plugin/tpch/statistics/StatisticsEstimator.java/StatisticsEstimator/estimateStats
class StatisticsEstimator:    public Optional<TableStatisticsData> estimateStats(TpchTable<?> tpchTable, Map<TpchColumn<?>, List<Object>> columnValuesRestrictions, double scaleFactor)
    {
        String schemaName = "sf" + scaleFactor;
        if (columnValuesRestrictions.isEmpty()) {
            return tableStatisticsDataRepository.load(schemaName, tpchTable, Optional.empty(), Optional.empty());
        }
        else if (columnValuesRestrictions.values().stream().allMatch(List::isEmpty)) {
            return Optional.of(zeroStatistics(tpchTable));
        }
        else {
            checkArgument(columnValuesRestrictions.size() <= 1, "Can only estimate stats when at most one column has value restrictions");
            TpchColumn<?> partitionColumn = getOnlyElement(columnValuesRestrictions.keySet());
            List<Object> partitionValues = columnValuesRestrictions.get(partitionColumn);
            TableStatisticsData result = zeroStatistics(tpchTable);
            for (Object partitionValue : partitionValues) {
                Slice value = checkType(partitionValue, Slice.class, "Only string (Slice) partition values supported for now");
                Optional<TableStatisticsData> tableStatisticsData = tableStatisticsDataRepository
                        .load(schemaName, tpchTable, Optional.of(partitionColumn), Optional.of(value.toStringUtf8()));
                if (!tableStatisticsData.isPresent()) {
                    return Optional.empty();
                }
                result = addPartitionStats(result, tableStatisticsData.get(), partitionColumn);
            }
            return Optional.of(result);
        }
    }