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

```

if (with_final_mark && data_written)
    {
        for (size_t i = 0; i < columns_list.size(); ++i)
        {
            writeIntBinary(plain_hashing.count(), marks_out);
            writeIntBinary(static_cast<UInt64>(0), marks_out);
        }
        writeIntBinary(static_cast<UInt64>(0), marks_out);
    }
    plain_file->next();
    if (marks_source_hashing)
        marks_source_hashing->next();
    if (marks_compressor)
        marks_compressor->next();
    marks_file_hashing->next();
    addToChecksums(checksums);
    plain_file->preFinalize();
    marks_file->preFinalize();
}
void MergeTreeDataPartWriterCompact::finishDataSerialization(bool sync)
{
    plain_file->finalize();
    marks_file->finalize();
    if (sync)
    {
        plain_file->sync();
        marks_file->sync();
    }
}
static void fillIndexGranularityImpl(