```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 (settings.parallel_replicas_count > 1)
            {
                if (relative_sample_size == RelativeSize(0))
                    relative_sample_size = 1;
                relative_sample_size /= settings.parallel_replicas_count.value;
                relative_sample_offset += relative_sample_size * RelativeSize(settings.parallel_replica_offset.value);
            }
            if (relative_sample_offset >= RelativeSize(1))
                no_data = true;
            
            bool has_lower_limit = false;
            bool has_upper_limit = false;
            RelativeSize lower_limit_rational = relative_sample_offset * size_of_universum;
            RelativeSize upper_limit_rational = (relative_sample_offset + relative_sample_size) * size_of_universum;
            UInt64 lower = boost::rational_cast<ASTSampleRatio::BigNum>(lower_limit_rational);
            UInt64 upper = boost::rational_cast<ASTSampleRatio::BigNum>(upper_limit_rational);
            if (lower > 0)
                has_lower_limit = true;
            if (upper_limit_rational < size_of_universum)
                has_upper_limit = true;
            /*std::cerr << std::fixed << std::setprecision(100)
                << "relative_sample_size: " << relative_sample_size << "\n"
                << "relative_sample_offset: " << relative_sample_offset << "\n"
                << "lower_limit_float: " << lower_limit_rational << "\n"
                << "upper_limit_float: " << upper_limit_rational << "\n"
                << "lower: " << lower << "\n"
                << "upper: " << upper << "\n";*/
            if ((has_upper_limit && upper == 0)
                || (has_lower_limit && has_upper_limit && lower == upper))
                no_data = true;