```sql
DROP TABLE IF EXISTS tp;

create table tp (d1 Int32, d2 Int32, eventcnt Int64,
projection p (select sum(eventcnt), d1 group by d1)) 
engine = SummingMergeTree order by (d1, d2);

set allow_experimental_projection_optimization = 1, force_optimize_projection = 1;

select sum(eventcnt) eventcnt, d1
from tp
group by d1;

DB::Exception: No projection is used when allow_experimental_projection_optimization = 1.

```

The exception message is also incorrect, should be "when force_optimize_projection = 1".

if (partition_pruner)
        {
            auto description = partition_pruner->getKeyCondition().getDescription();
            index_stats->emplace_back(ReadFromMergeTree::IndexStat{
                .type = ReadFromMergeTree::IndexType::Partition,
                .condition = std::move(description.condition),
                .used_keys = std::move(description.used_keys),
                .num_parts_after = part_filter_counters.num_parts_after_partition_pruner,
                .num_granules_after = part_filter_counters.num_granules_after_partition_pruner});
        }
    }
    
    MergeTreeDataSelectSamplingData sampling = use_cache ? std::move(cache->sampling) : MergeTreeDataSelectSamplingData{};
    if (!use_cache)
    {
        assert(key_condition.has_value());
        RelativeSize relative_sample_size = 0;
        RelativeSize relative_sample_offset = 0;
        auto select_sample_size = select.sampleSize();
        auto select_sample_offset = select.sampleOffset();
        if (select_sample_size)
        {
            relative_sample_size.assign(
                select_sample_size->as<ASTSampleRatio &>().ratio.numerator,
                select_sample_size->as<ASTSampleRatio &>().ratio.denominator);
            if (relative_sample_size < 0)
                throw Exception("Negative sample size", ErrorCodes::ARGUMENT_OUT_OF_BOUND);
            relative_sample_offset = 0;
            if (select_sample_offset)
                relative_sample_offset.assign(