```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');

```

{
    writeDataBlock(block, granules_to_write);
    if (settings.rewrite_primary_key)
    {
        Block primary_key_block = getBlockAndPermute(block, metadata_snapshot->getPrimaryKeyColumns(), nullptr);
        calculateAndSerializePrimaryIndex(primary_key_block, granules_to_write);
    }
    Block skip_indices_block = getBlockAndPermute(block, getSkipIndicesColumns(), nullptr);
    calculateAndSerializeSkipIndices(skip_indices_block, granules_to_write);
}
void MergeTreeDataPartWriterCompact::writeDataBlock(const Block & block, const Granules & granules)