```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".

*
          * [------********------]
          *        ^ - offset
          *        <------> - size
          *
          * If the interval passes through the end of the universe, then cut its right side.
          *
          * Example: SAMPLE 0.4 OFFSET 0.8
          *
          * [----------------****]
          *                  ^ - offset
          *                  <------> - size
          *
          * Next, if the `parallel_replicas_count`, `parallel_replica_offset` settings are set,
          *  then it is necessary to break the received interval into pieces of the number `parallel_replicas_count`,
          *  and select a piece with the number `parallel_replica_offset` (from zero).
          *
          * Example: SAMPLE 0.4 OFFSET 0.3, parallel_replicas_count = 2, parallel_replica_offset = 1
          *
          * [----------****------]
          *        ^ - offset
          *        <------> - size
          *        <--><--> - pieces for different `parallel_replica_offset`, select the second one.
          *
          * It is very important that the intervals for different `parallel_replica_offset` cover the entire range without gaps and overlaps.
          * It is also important that the entire universe can be covered using SAMPLE 0.1 OFFSET 0, ... OFFSET 0.9 and similar decimals.
          */
        
        
        if (settings.parallel_replicas_count > 1 && !data.supportsSampling() && settings.parallel_replica_offset > 0)