22.4.5

```sql
SELECT dummy
FROM cluster(test_cluster_two_shards, system.one)
WHERE dummy IN (
    SELECT dummy
    FROM cluster(test_cluster_two_shards, system.one)
)
LIMIT 1 BY dummy
SETTINGS distributed_product_mode = 'local'


Received exception from server (version 22.4.5):
Code: 43. DB::Exception: Received from localhost:9000. 
DB::Exception: Cannot create column of type Set. (ILLEGAL_TYPE_OF_ARGUMENT)

```

22.3.4.20
```sql
SELECT dummy
FROM cluster(test_cluster_two_shards, system.one)
WHERE dummy IN (
    SELECT dummy
    FROM cluster(test_cluster_two_shards, system.one)
)
LIMIT 1 BY dummy
SETTINGS distributed_product_mode = 'local'

┌─dummy─┐
│     0 │
└───────┘
```
query_analyzer.appendAggregateFunctionsArguments(chain, only_types || !first_stage);
            before_aggregation = chain.getLastActions();
            finalize_chain(chain);
            if (query_analyzer.appendHaving(chain, only_types || !second_stage))
            {
                having_step_num = chain.steps.size() - 1;
                before_having = chain.getLastActions();
                chain.addStep();
            }
        }
        bool join_allow_read_in_order = true;
        if (hasJoin())
        {
            
            join_has_delayed_stream = query_analyzer.analyzedJoin().needStreamWithNonJoinedRows();
            join_allow_read_in_order = typeid_cast<HashJoin *>(join.get()) && !join_has_delayed_stream;
        }
        optimize_read_in_order =
            settings.optimize_read_in_order
            && storage
            && query.orderBy()
            && !query_analyzer.hasAggregation()
            && !query_analyzer.hasWindow()
            && !query.final()
            && join_allow_read_in_order;
        
        query_analyzer.appendSelect(chain, only_types || (need_aggregate ? !second_stage : !first_stage));
        
        
        if (has_window)