```sql
CREATE TABLE t
(
   id Int64, 
   d String,
   p Map(String, String)
   
)
ENGINE = ReplacingMergeTree order by id settings index_granularity  = 0;


insert into t values (1,  's', {'a':'b'});

CH starts eating RAM until it crashes

the same with

insert into t select 1,  's', map('a','b');

```

max_added_blocks);
        if (!query_info.merge_tree_select_result_ptr->error())
        {
            
            
            auto sum_marks = query_info.merge_tree_select_result_ptr->marks() + 1;
            if (sum_marks < min_sum_marks)
            {
                selected_candidate = nullptr;
                min_sum_marks = sum_marks;
            }
        }
        
        for (auto & candidate : candidates)
        {
            if (candidate.desc->type == ProjectionDescription::Type::Aggregate)
            {
                selectBestProjection(
                    reader,
                    storage_snapshot,
                    query_info,
                    added_filter_nodes,
                    analysis_result.required_columns,
                    candidate,
                    query_context,
                    max_added_blocks,
                    settings,
                    parts,
                    selected_candidate,
                    min_sum_marks);